We have two equations: $$1. \ a_1 + a_2 + a_3 = 21$$
$$2. \ a_1^2 + a_2^2 + a_3^2 = 189$$
Answer should by $a_1$, $a_2$ and $a_3$. How the title says, these 3 elements are part of geometric progression.
I have no idea how to solve that problem. Any description on how to solve it mathematically, not just bruteforce it by guessing will be great. Thanks in advance!!
Assume that the terms are $m, mr, mr^2$.
$(2)\div(1):$
$$\begin{align} 9&=\frac{m^2(1+r^2+r^4)}{m(1+r+r^2)}\\ &=\frac{m(1-r+r^2)(1+r+r^2)}{1+r+r^2}\\ &=m(1-r+r^2)&&\text{as }1+r+r^2\neq0\end{align}$$ and the solution for which is $$m=3, r=2$$ i.e. the three numbers are $3,6,12$.