Force on a charged particle $$\vec{F} = q( \vec{v} \times \vec{B})$$
Let the magnetic field $$\vec{B} =B_x \hat{i} + B_y \hat{j} + B_z \hat{k}$$
$$1^{st}\ Case:$$
$$\vec{F}= (10 \times 10^{-6} \times 10^6)( \cos 45^{\circ}\hat{i} + \sin 45^{\circ} \hat{j}) \times (B_x \hat{i} + B_y \hat{j} + B_z \hat{k})$$
$$\therefore 5 \times \sqrt{2} \times 10^{-3}(-\hat{k} )= \dfrac{10}{\sqrt{2}}(\hat{i} + \hat{j})\times (B_x \hat{i} + B_y \hat{j} +B_z \hat{k})= \dfrac{10}{\sqrt{2}}[B_z\hat{i} - B_z \hat{j} +(B_y -B_x)\hat{k} ] $$
Equating both LHS and RHS for components
$$B_z=0$$; $$B_y-B_x =-10^{-3} .......................................(1)$$
$$2^{nd}\ Case:$$
$$\vec{F} = (10 \times 10^{-6} \times 10^6)(\hat{k} ) \times (B_x \hat{i} + B_y \hat{j} + B_z \hat{k})$$
$$\therefore F_2 \hat{j} =(10 \times 10^{-6} \times 10^6)(B_x\hat{j} -B_y \hat{i})=10 \times(B_x\hat{j} -B_y \hat{i})$$
$$ \Rightarrow F_2 =10B_x$$; $$B_y=0 .............................(2)$$
From $$(1)$$ and $$(2)$$
$$B_y-B_x =-10^{-3}= 0 - B_x =-10^{-3}$$
$$ \Rightarrow B_x= 10^{-3}\:T$$
$$ \Rightarrow \vec{B} = (10^{-3}\:T) \hat{i}$$
From eqn$$(2)$$
$$F_2= 10B_x= 10 \times 10^{-3}= 10^{-2}\:N$$