\(\frac{\sqrt{2}cosx-2cos\left(\frac{\pi}{4}+x\right)}{2sin\left(\frac{\pi}{4}+x\right)-\sqrt{2}sinx}\\ =\frac{cosx-\sqrt{2}cos\left(\frac{\pi}{4}+x\right)}{\sqrt{2}sin\left(\frac{\pi}{4}+x\right)-sinx}\\ =\frac{cosx-\sqrt{2}\left(\frac{\sqrt{2}}{2}cosx-\frac{\sqrt{2}}{2}sinx\right)}{\sqrt{2}\left(\frac{\sqrt{2}}{2}cosx+\frac{\sqrt{2}}{2}sinx\right)-sinx}\\ =\frac{cosx-cosx+sinx}{cosx+sinx-sinx}\\ =\frac{sinx}{cosx}=tanx\)