[Solution by Dr. Abubacker] $\sqrt2(\sin x-\cos x)=2\sin\left(x-\frac\pi4\right)\in[-2,2]$, so the argument ranges over $[m-4,m]$. The range of $f$ is $[0,2]$ means $\log_{\sqrt m}(m-4)=0\Rightarrow m-4=1\Rightarrow m=5$, and the maximum is $\log_{\sqrt5}5=2$ as required. So $m=5$. Answer (1).