$$
\sin x = \overbrace{\sin\left( 2\cdot \frac x 2 \right) = 2\sin\left( \frac x 2 \right) \cos\left( \frac x 2 \right)}^{\large\text{the double-angle formula for the sine}}$$
If $z = \tan \frac x 2,$ then what are $\sin \frac x 2$ and $\cos \frac x 2\,$?
In the first quadrant, we can say $\tan = \dfrac \sin \cos$ and $\sin^2+\cos^2 = 1,$ and thereby conclude that
$$
\sin = \frac \tan {\sqrt{1+\tan^2}} \text{ and } \cos = \frac 1 {\sqrt{1+\tan^2}}
$$
so you have
$$
2\cdot \frac z {1+z^2} \cdot \frac 1 {\sqrt{1+z^2}} = \frac {2z}{1+z^2}.
$$
In the fourth quadrant, the denominator will be the same, but the sign of the tangent will agree with the sign of the sine.
And in the other two quadrants, the whole function just repeats.