How to solve this optimisation problem for $x_1^*$ and $x_2^*$ using Lagrangian I am attempting the following optimization problem, to yield $x_1^*$ and $x_2^*$ in terms of $p$ and $u$. Although I cannot seem to get to the solution outlined below, what I believe should be a simple algebraic exercise has left me with pages of workings and no result. I would appreciate some guidance on the logic and order of operations here.
My approach so far has been to find $x_1$ and $x_2$ from the first two equations and then substitute into the final equation, although I am constantly left with an expression of $x_1$ in terms of $x_2$.

 A: From the first tw0 partial derivatives we have the following two equations:
$$p_1=\lambda\cdot \alpha k\cdot \left(\frac{x_2}{x_1}\right)^{1-\alpha}\Rightarrow p_1=\lambda\cdot \alpha\cdot  k\cdot x_2^{1-\alpha}\cdot x_1^{\alpha-1}$$
$$p_2=\lambda\cdot (1-\alpha) k\cdot \left(\frac{x_1}{x_2}\right)^{\alpha}\Rightarrow p_2=\lambda\cdot (1-\alpha)\cdot  k\cdot x_1^{\alpha}\cdot x_2^{-\alpha}$$
Dividing the first equation by the second equation. $\lambda$ and $k$ are cancelled out directly.
$$\frac{p_1}{p_2}=\frac{\alpha\cdot  x_2^{1-\alpha}\cdot x_1^{\alpha-1}}{(1-\alpha)\cdot   x_1^{\alpha}\cdot x_2^{-\alpha}}$$
$$\frac{p_1}{p_2}=\frac{\alpha}{1-\alpha}\cdot \frac{  x_1^{\alpha-1}}{  x_1^{\alpha}}\cdot \frac{ x_2^{1-\alpha}}{  x_2^{-\alpha}}$$
Using exponent-rules
$$\frac{p_1}{p_2}=\frac{\alpha}{1-\alpha}\cdot \frac{  x_2}{  x_1}\Rightarrow x_2=\frac{p_1}{p_2}\cdot \frac{1-\alpha}{\alpha}\cdot x_1$$
Input the expression for $x_2$ into the third FOC (first order condition).
$$\overline u=k\cdot x_1^{\alpha}\cdot \left(\frac{p_1}{p_2}\cdot \frac{1-\alpha}{\alpha}\cdot x_1\right)^{1-\alpha}$$
$$\overline u=k\cdot x_1^{\alpha}\cdot \left(\frac{p_1}{p_2}\cdot \frac{1-\alpha}{\alpha}\right)^{1-\alpha}\cdot x_1^{1-\alpha}$$
$x_1^{\alpha}\cdot x_1^{1-\alpha}=x_1$
$$\overline u=k\cdot \left(\frac{p_1}{p_2}\cdot \frac{1-\alpha}{\alpha}\right)^{1-\alpha}\cdot x_1$$
We can write the term in the brackets at the LHS by swapping the numerators and the denominators.
$$\overline u\cdot \left(\frac{p_2}{p_1}\cdot \frac{\alpha}{1-\alpha}\right)^{1-\alpha} =k\cdot x_1$$
$$x_1^*=\frac{\overline u}k\cdot \left(\frac{p_2}{p_1}\cdot \frac{\alpha}{1-\alpha}\right)^{1-\alpha} $$
