The limit is $$\lim_{x\to\pi/4}\frac{1-\tan x}{1-\sqrt{2}\sin x}$$ I was able to solve it using L'hopital and the answer that I got was $2$.
Can you please confirm if the answer is right and suggest some other way to evaluate the limit without using L'hopital?
You can use Taylor expansions. The Taylor expansion of a function $f(x)$ around a point $x=a$ can be written as the infinite sum $$f(x)=f(a)+\frac{f'(a)}{1!}(x-a)+\frac{f''(a)}{2!}(x-a)^2+...$$ You can find more information about Taylor expansion in https://es.wikipedia.org/wiki/Serie_de_Taylor.
If you expand the trigonometric functions around $x=\pi/4$ up to first order you find $$\tan(x)=1+\left.1/\cos(x)^2\right|_{x=\pi/4}(x-\pi/4)+...=1+2(x-\pi/4)+...\\ \sin(x)=\frac{\sqrt2}{2}+\frac{\sqrt2}{2}(x-\pi/4)+...$$ Then, considering the terms in the polynomial up to first order $(x-\pi/4)$, the limit can be written as $$\lim_{x\to\pi/4}\frac{1-1+2(x-\pi/4)}{1-\sqrt2\left[\frac{\sqrt2}{2}+\frac{\sqrt2}{2}(x-\pi/4)\right]}=\lim_{x\to\pi/4}\frac{2(x-\pi/4)}{(x-\pi/4)}=2$$