there are 3 vertices to define a triangle.
print(x,y)
[1 2 3] [ 2 3 -2]
python could be used to plot this triangle
plt.triplot(x,y)
the output is
I am trying to compute the new vertices after rotate a triangle to have the left vertex move to a point y axis = -2, keep right vertex fixed.
which formula could be used to get the x axis of left vertex and (x,y) of top vertex of the new triangle?

Using complex numbers.
Let $z_0$ be the fixed vertex and $z_1$ the vertex that goes to $y=-2$. This is expressed by
$$e^{i\theta}(z_1-z_0)+z_0=x+iy,$$ where $x$ is free.
From this,
$$e^{i\theta}=\frac{x+iy-z_0}{z_1-z_0}.$$
To determine $x$, we express that the modulus of the RHS is one, so that
$$(x-x_0)^2+(y-y_0)^2=|z_1-z_0|^2,$$
or
$$x=x_0\pm\sqrt{|z_1-z_0|^2-(y-y_0)^2}.$$
So there are two solutions in $x$ (which was to be expected, from geometry), and $\theta$ is given by
$$\arctan\frac{x-x_0}{y-y_0}-\arctan\frac{x_1-x_0}{y_1-y_0}.$$