The magnetic field at a point P due to a current carrying straight wire, such that the ends of the wires, makes angle α and β (see figure) is given by B=‌
µ0I
4Ï€d
(sin‌α−sin‌β) where, d is the distance between the point P and wire.
In the given problem, α=θ1 and β=θ2 ∴‌‌B=‌