Proving Ramanujan's formula While reading this PDF, they introduced a theorem by Ramanujan:


Theorem
If $$\alpha^2+\alpha\beta+\beta^2=3\lambda\gamma^2$$
Then$$(\alpha+\lambda^2\gamma)^3+(\lambda\beta+\gamma)^3=(\lambda\alpha+\gamma)^3+(\beta+\lambda^2\gamma)^3$$


I was wondering if there is a simple way to prove this? You could just expand both sides and show that they are equivalent, but that doesn't give me insight to how Ramanujan came up with this formula in the first place.
Note: $\alpha,\beta,\gamma,\lambda\in\mathbb{N}$
 A: A proof without expanding both sides.
Using that 
$$A^3-B^3=(A-B)(A^2+AB+B^2)$$
we get
$$(\alpha+\lambda^2\gamma)^3-(\beta+\lambda^2\gamma)^3+(\lambda\beta+\gamma)^3-(\lambda\alpha+\gamma)^3$$

$$=(\alpha-\beta)((\alpha+\lambda^2\gamma)^2+(\alpha+\lambda^2\gamma)(\beta+\lambda^2\gamma)+(\beta+\lambda^2\gamma)^2)$$$$\qquad+(\lambda\beta-\lambda\alpha)((\lambda\beta+\gamma)^2+(\lambda\beta+\gamma)(\lambda\alpha+\gamma)+(\lambda\alpha+\gamma)^2)$$

$$=(\alpha-\beta)(\color{red}{\alpha^2+\alpha\beta+\beta^2}+3\alpha\lambda^2\gamma+3\beta\lambda^2\gamma+3\lambda^4\gamma^2)$$$$\qquad+\lambda(\beta-\alpha)(\lambda^2(\color{red}{\alpha^2+\alpha\beta+\beta^2})+3\lambda\beta\gamma+3\lambda\alpha\gamma+3\gamma^2)$$

$$=(\alpha-\beta)(\color{red}{3\lambda\gamma^2}+3\alpha\lambda^2\gamma+3\beta\lambda^2\gamma+3\lambda^4\gamma^2)$$$$\qquad+\lambda(\beta-\alpha)(\lambda^2\cdot \color{red}{3\lambda\gamma^2}+3\lambda\beta\gamma+3\lambda\alpha\gamma+3\gamma^2)$$

$$=(\alpha-\beta)(3\lambda\gamma^2+3\alpha\lambda^2\gamma+3\beta\lambda^2\gamma+3\lambda^4\gamma^2)$$$$\qquad-(\alpha-\beta)(3\lambda\gamma^2+3\alpha\lambda^2\gamma+3\beta\lambda^2\gamma+3\lambda^4\gamma^2)$$
$$\boxed{=0}$$
