How did people get the inspiration for the sums of cubes formula?

The formula that Ramanujan actually recorded, as well as Euler's solution, are discussed by Ono in https://arxiv.org/abs/1510.00735

The original formula was $$ \left( 6 a^2 - 4ab + 4 b^2 \right)^3 = \left( 3 a^2 +5ab - 5 b^2 \right)^3 + \left( 4 a^2 - 4ab + 6 b^2 \right)^3 + \left( 5 a^2 - 5ab -3 b^2 \right)^3 $$

The formula can be made more symmetric still. The two classes of forms of discriminant $85$ are represented by $$ x^2 + 9 xy - y^2, $$ $$ 3 x^2 + 7 xy - 3 y^2. $$ The latter is equivalent to $3 x^2 - 5 xy - 5 y^2, $ off by a single minus sign.

The two classes of (primitive) forms of discriminant $-20$ are represented by $$ x^2 + 5 y^2, $$ $$ 2 x^2 + 2 xy + 3 y^2. $$

That is, one may pass between Ramanujan's version and yours by using Gauss composition in order to multiply by $3,$ which passes between the principal genus and the other genus, both for discriminant $85$ and $-20.$

On page 2 they give Ramanujan's modern version of Euler's complete solution. When $$ \alpha^2 + \alpha \beta + \beta^2 = 3 \lambda \gamma^2, $$ $$ \left( \alpha + \lambda^2 \gamma \right)^3 + \left( \lambda \beta + \gamma \right)^3 = \left(\lambda \alpha + \gamma \right)^3 + \left( \beta + \lambda^2 \gamma \right)^3 $$

http://esciencecommons.blogspot.com/2015/10/mathematicians-find-magic-key-to-drive.html


Actually, Mathematica can solve, $$\small (x^2+axy+by^2)^3+(cx^2+dxy+ey^2)^3+(fx^2+gxy+hy^2)^3+(ix^2+jxy+ky^2)^3 =0\tag2$$ One may be guided by the principle of fait accompli (accomplished fact). Ramanujan and others already found solutions therefore $(2)$, approached the right way, must be solvable.

What you do is expand $(2)$ and collect powers of $x,y$. The Mathematica command is Collect[P(x,y),{x,y}] to get,

$$P_1x^6+P_2x^5y+P_3x^4y^2+P_4x^3y^3+P_5x^2y^4+P_6xy^5+P_7y^6 = 0$$

where the $P_i$ are polynomials in the other variables. The hard part is then solving the system,

$$P_1 = P_2 = \dots =P_7 = 0$$

After much algebraic manipulation (which I don't have the strength to type all down), one ends up with the simple identity (which I gave to Mathworld back in 2005),

$$(ax^2-v_1xy+bwy^2)^3 + (bx^2+v_1xy+awy^2)^3 + (cx^2+v_2xy+dwy^2)^3 + (dx^2-v_2xy+cwy^2)^3 = \color{blue}{(a^3+b^3+c^3+d^3)}(x^2+wy^2)^3\tag3$$ where, $$v_1= c^2-d^2\\ v_2= a^2-b^2\\ w= (a+b)(c+d)$$

Thus, if the $RHS$ is zero, or you find a single instance of $\color{blue}{a^3+b^3+c^3+d^3 = 0}$, then the $LHS$ yields a quadratic parameterization that guarantees an infinite more. So to answer your question, $(3)$ can be used to generate infinitely many Ramanujan-type formulas like $(1)$.

Example: The two smallest taxicab numbers are,

$$1^3+12^3=9^3+10^3\\ \color{blue}{2^3+16^3=9^3+15^3}$$

Using the second one and formula $(3)$, and after scaling the variable $y' \to y/12$ to reduce coefficient size, one gets, $$(\color{blue}2 x^2 + 12 x y - 48 y^2)^3 + (\color{blue}{16} x^2 - 12 x y - 6 y^2)^3 + (\color{blue}{-9} x^2 - 21 x y + 45 y^2)^3 + (\color{blue}{-15} x^2 + 21 x y + 27 y^2)^3 = 0$$ and you can see its "parents" in blue.