This question comes from Vakil's FOAG, page 530, right before exercise 19.9 E, self-study.
Suppose you have defined the $j$-invariant of an elliptic curve $(E, p)$ given by $y^2\,z = x^3 + a\,x\,z^2 + b\,z^3$ to be
$$j(\lambda) = 2^8\frac{(\lambda^2 - \lambda + 1)^3}{\lambda^2(\lambda - 1)^2}$$
where $\lambda$ is the cross-ratio of the three distinct roots of the right-hand side's affine form (ditch the $z$) and the point at infinity $p = [0, 1, 0]$.
How do you conclude from this that $j$ can also be given by
$$j(a, b) = 2^8\frac{3^3a^3}{4a^3 + 27b^2}?$$
Tools it seems we have at our disposal: the formula for $\lambda$ as a cross-ratio is, calling the 4 roots $(p, q_1, q_2, q_3)$, where $p$ is the point at infinity, assuming I derived it correctly
$$\lambda = \frac{(q_3-q_1)(q_2 - p)}{(q_3 - p)(q_2-q_1)}$$
I suppose we also have Vieta's formulas and the cubic formula if we need them.
I have been unable to synthesize these tools to produce the result, so it feels as if I am not realizing a key fact. Vakil mentions that this takes a little sweat, so an outline of the method should suffice; I can work it out myself once I know the general procedure.
The exercise requires some elementary algebraic manipulation. The cubic equation is $$ x^3 \!+\! a x \!+\! b \!=\! (x\!-\!q_1)(x\!-\!q_2)(x\!-\!q_3) \!=\! 0 \tag{1} $$ where $\,q_1,q_2,q_3\,$ are its roots. From Vieta's formulas $$ q_3 \!=\! -q_1\!-\!q_2, \quad a \!=\! q_1q_2 \!+\! q_1q_3 \!+\! q_2q_3, \quad b \!=\! -q_1q_2q_3. \tag{2} $$
The discriminant is defined by $$ \Delta := ((q_1-q_2)(q_1-q_3)(q_2-q_3))^2. \tag{3} $$ Note that $\,a = -(q_1^2+q_1q_2+q_2^2)\,$ which explains the minus sign in $$ \Delta = -(4a^3 + 27b^2). \tag{4} $$ Let $\,\lambda\,$ be the cross ratio of the roots with infinity $\,\{\infty,q_1,q_2,q_3\}\,$ following Wikipedia Cross-ratio $$ \lambda = (\infty,q1;q_2,q_3) := \frac{(q_2-\infty)(q_3 - q_1)}{(q_2 - q_1)(q_3-\infty)} \\ = \frac{(q_3-q_1)}{(q_2-q_1)}. \tag{5} $$ Now verify using elementary algebra and following Wikipedia Modular lambda function that $$ j(\lambda) := 2^8\frac{(\lambda^2-\lambda+1)^3}{\lambda^2(\lambda-1)^2} = 2^8 \frac{(3a)^3}{4a^3+27b^2}. \tag{6} $$ Note that, depending on the order of the elements of the cross-ratio, there are six values of $\,\lambda\,$ but they all lead to the same value for $\,j(\lambda).$
An alternative approach is to express $\,j(\lambda)\,$ in terms of the elementary symmetric polynomials of the cubic roots. From Vieta's formulas $$ e_1 := q_1 + q_2 + q_3 = 0, \\ e_2 := q_1q_2+q_1q_3+q_2q_3 = a, \\ e_3 := q_1q_2q_3 = -b. \tag{7} $$ The difficulty depends on identifying the parts of the rational function $\,j(\lambda)\,$ in terms of $\,e_1,e_2,e_3\,$ which is hard to do by manual calculations. With Computer algebra systems such as Mathematica, it can be automated. For example the Wolfram language code
returns the result
(27*a^3)/(4*a^3 + 27*b^2)which depends critically on the
SymmetricReductionfunction.