I am trying to find the magnetic field due to a current carrying wire.

Why is the length $rd\theta$? One of the radius is $r$ but the other is $(r+dL \cos(\theta))$. And, $\theta$ can be large or small. How do you assume that the two lengths are $r$?
In general, $r \theta$ is the length of the arc of the circle of radius r subtended by a central angle $\theta$. This comes straight from the definition of radian.
In the picture, it seems they are approximating the "straight" leg of the little triangle, with the "curved" arc swept out by the arm of length $r$ through angle $d\theta$. This is reasonable when $d\theta$ is small.