Biot savart law is the base of all magnetism and the effects of current.
It states that the magnetic field intensity due to an element of a current carrying wire at point near the element is directly proportional to the 1) length of the element, 2) the current, 3) the sine of the angle between the element and the line joining the element and the point. It is inversely proportional to the square of the distance of the point from the element.
Thus, in the given diagram, the magnetic induction (field intensity) dB is given by, dB=kIdlsinθr2
here k is the constant of proprtionality.
Then the induction due to the whole wire at the point P is obtained by integration
∴B=∫dB=∫k(Idlsinθr2)
When the whole system is in air, k=μ04π
Here μ0 is known as the magnetic permeability of air or vacuum.
The final formula is, B=(μ04π)×(2Ia) where a is the distance between the wire and the point.
The proof for this is not there for you.