The given equation is linear in $$y$$:
$$\frac{dy}{dx}+y\tan x=\sec x$$ for $$0 \lt x \lt \frac{\pi}{2}$$.
For a linear differential equation $$\frac{dy}{dx}+P(x)\,y=Q(x)$$, the integrating factor (I.F.) is $$e^{\int P(x)\,dx}$$.
Here $$P(x)=\tan x$$, so
$$\text{I.F.}=e^{\int \tan x\,dx}=e^{-\ln\!\cos x}= \cos^{-1}x=\sec x,$$
because $$\int \tan x\,dx=-\ln|\cos x|$$ and $$\cos x \gt 0$$ in the interval under consideration.
Multiply the differential equation by the integrating factor $$\sec x$$:
$$\sec x\,\frac{dy}{dx}+y\,\tan x\,\sec x=\sec^2 x.$$
Notice that
$$\frac{d}{dx}\bigl(y\sec x\bigr)=\sec x\,\frac{dy}{dx}+y\,\sec x\,\tan x,$$
so the left-hand side is exactly $$\frac{d}{dx}(y\sec x)$$. Hence
$$\frac{d}{dx}\bigl(y\sec x\bigr)=\sec^2 x.$$
Integrate with respect to $$x$$:
$$y\sec x=\int \sec^2 x\,dx=\tan x+C.$$
Use the initial condition $$y(0)=1$$:
At $$x=0$$, $$\sec 0=1$$ and $$\tan 0=0$$, so $$1\cdot1=0+C\;\Rightarrow\;C=1.$$
Thus
$$y\sec x=\tan x+1
\;\Longrightarrow\;
y=\frac{\tan x+1}{\sec x}=(\tan x+1)\cos x.$$
Now evaluate at $$x=\frac{\pi}{4}$$:
$$\tan\!\frac{\pi}{4}=1,\qquad\cos\!\frac{\pi}{4}=\frac{1}{\sqrt2},$$
so
$$y\!\left(\frac{\pi}{4}\right)=(1+1)\cdot\frac{1}{\sqrt2}=\frac{2}{\sqrt2}=\sqrt2.$$
Therefore the required value is $$\sqrt{2}$$.
Option B which is: $$\sqrt{2}$$