Answer
(a)$ \frac{1-\cos x}{\sin x}=\frac{\sin x}{1+\cos x}$
(b) $\tan ^{2}\left(\frac{x}{2}\right) =\frac{1-\cos x}{1+\cos x}$
Work Step by Step
(a) Since
\begin{align*}
\sin ^{2} x+\cos ^{2} x&=1 \\
\sin ^{2} x&=1-\cos ^{2} x\\
&=(1-\cos x)(1+\cos x) \end{align*}
Then
\begin{align*}
(1-\cos x)&=\frac{\sin ^{2} x}{1+\cos x} \\
\frac{1-\cos x}{\sin x}&=\frac{\sin x}{1+\cos x}
\end{align*}
(b) We have
\begin{align*}
\tan ^{2}\left(\frac{x}{2}\right)&=\frac{\sin ^{2}\left(\frac{x}{2}\right)}{\cos ^{2}\left(\frac{x}{2}\right)}\\
&=\frac{\frac{1-\cos \left(2\left(\frac{x}{2}\right)\right)}{2\left(2-\left(\frac{x}{2}\right)\right)}}{\frac{1+\cos \left(2\left(\frac{x}{2}\right)\right)}{2}}\\
&=\frac{1-\cos x}{1+\cos x}
\end{align*}