How compute the first fundamental form by using the matric tensor transformation

Consider the parametrization of the unit sphere:

$\overline{X}=\left( \cos{a_1} \sin{a_2}, \sin{a_1} \sin{a_2}, \cos{a_2} \right)$

Given the parametrization $\overline{\Pi}:\mathbb{S}^{2} - N \rightarrow \mathbb{R}^{2}$ of the unit sphere by stereographic projection:

$\overline{\Pi} (x_1,x_2,x_3) = \left( \frac{x_1}{1-x_3},\frac{x_2}{1-x_3} \right)$

It is possible to define the new parametrization $\overline{F}=\overline{\Pi} \circ \overline{X}$. When computing this parametrization we get:

$\overline{F}=\left( \frac{\cos{a_1}}{\tan{\frac{a_2}{2}}},\frac{\sin{a_1}}{\tan{\frac{a_2}{2}}} \right)$

The first fundamental form of $\overline{F}$ can then be computed in two different ways. The first one consists in applying the definition of the first fundamental form directly on $\overline{F}$. By doing so we have:

$\overline{g}_{11}=\frac{1}{\tan{\frac{a_2}{2}}^2}$

$\overline{g}_{12}=g_{21}=0$

$\overline{g}_{22}=\frac{1}{4 (\sin{\frac{a_2}{2}})^4}$

The second way to compute the first fundamental form is by using the change of coordinate relation: $$\overline{g}_{ij}=\sum_{k=1}^{2} \sum_{l=1}^{2} \frac{\partial x_k}{\partial a_i} \frac{\partial x_l}{\partial a_j} g_{kl}$$ When doing that everything works fine except for $g_{22}$. According to my computation:

$\frac{\partial x_1}{\partial a_1}=-\sin{a_1} \sin{a_2}$

$\frac{\partial x_1}{\partial a_2}=\cos{a_1} \cos{a_2}$

$\frac{\partial x_2}{\partial a_1}=\cos{a_1} \sin{a_2}$

$\frac{\partial x_2}{\partial a_2}=\sin{a_1} \cos{a_2}$

Now $\overline{g}_{22}=g_{11} \left(\frac{\partial x_1}{\partial a_2}\right)^2+g_{22} \left(\frac{\partial x_2}{\partial a_2}\right)^2$. Since

$g_{11}=g_{22}=\frac{1}{(1-x_3)^2}$, $\overline{g}_{22}$ can be written as:

$\overline{g}_{22}=g_{11} \left(\ \left(\frac{\partial x_1}{\partial a_2}\right)^2+\left(\frac{\partial x_2}{\partial a_2}\right)^2\right)$.

When computing this expression I got $\overline{g}_{22}=g_{11} (\cos{a_2})^2=\frac{(\cos{a_2})^2}{(1-\cos{a_2})^2}$ which is different from $\overline{g}_{22}$ computed by using the definition of first fundamental form. Clearly I did an error, but where?

Your map $X$ is a parametrization. Your map $\Pi$ is a coordinate chart, the inverse of a parametrization. You need to compute $\Pi^{-1}$ and use it to compute the first fundamental form.