The given situation can be redrawn as follows. As we know the general formula for finding the magnetic field due to a finite length wire
$B=\frac{\mu_{0}}{4 \pi} \cdot \frac{i}{r}\left(\sin \phi_{1}+\sin \phi_{2}\right)$
Here, $\phi_{1}=0^{\circ}, \phi=45^{\circ}$
$\therefore B=\frac{\mu_{0}}{4 \pi} \cdot \frac{i}{r}\left(\sin 0^{\circ}+\sin 45^{\circ}\right)$
$=\frac{\mu_{0}}{4 \pi} \cdot \frac{i}{\sqrt{2} L}$
$\Rightarrow B=\frac{\sqrt{2} \mu_{0} i}{8 \pi l}$