Let $\mathfrak{g}_{\alpha}$ be a three dimensional Lie algebra, with basis $\{X,Y,Z\}$, and the Lie bracket is described as $$ \begin{aligned} {[X,Y]}&=Y\\ [X,Z]&=\alpha Z\\ [Y,Z]&=0 \end{aligned} $$
I need to show $\mathfrak{g}_{\alpha}\cong\mathfrak{g}_{\alpha'}$ if and only if $\alpha=\alpha'$ or $\alpha=\frac{1}{\alpha'}$.
Clearly if $\alpha=\alpha'$ or $\alpha=\frac{1}{\alpha'}$ then $\mathfrak{g}_{\alpha}\cong\mathfrak{g}_{\alpha'}$. But for conversely, I choose a Lie algebra isomorphism $\varphi$ and write $$ \varphi(X)=a_{11}X+a_{12}Y+a_{13}Z $$ and so on. I want to use the property $\varphi([X,Y])=[\varphi(X),\varphi(Y)]$ to get the relation about $\alpha$ and $\alpha'$.
But I only get lots of meaningless equations, is there anything wrong with my idea? and is there any easy way to show this?
Thanks in advance!
Write $\varphi([X,Y])=[\varphi(X),\varphi(Y)]$ in matrix form $$ \phi\circ {\rm ad}(X)={\rm Ad}(\phi(x))\circ \phi. $$ In particular we have $$ \phi\circ {\rm ad}(X)\circ \phi^{-1}={\rm Ad}(\phi(x)), $$ so that the operators ${\rm ad}(X)$ and ${\rm Ad}(\phi(x))$ are similar, so they have the same characteristic polynomial, the same trace, the same determinant. These conditions give equations in the parameters of $\phi$ which immediately give $\alpha-\alpha'=0$ or $\alpha\alpha'=1$.