1) What we have here is a case for the Similarity of Triangles. Therefore we can find the missing sides by setting a proportion. Like that
[tex]\begin{gathered} \frac{12}{y}=\frac{36}{18+y} \\ 12(18+y)=36y\text{ } \\ \text{Dividing both sides by 12} \\ 18\text{ +y =3y} \\ \text{Subtracting 3y from both sides} \\ -3y+y+18=0 \\ -2y=-18 \\ y=9 \end{gathered}[/tex]
1.2) Now let's proceed and find x, based on Similarity we can set another proportion. Considering that y=9.
[tex]\begin{gathered} \frac{12}{9}=\frac{x}{(9+18+972)} \\ \frac{12}{9}=\frac{x}{999} \\ \text{Simplify the first ratio} \\ \frac{4}{3}=\frac{x}{999} \\ \text{Cross multiply that} \\ 3x=4\cdot999 \\ 3x=3996 \\ \text{Divide both sides by 3} \\ x=1332 \end{gathered}[/tex]
2) So x= 1332 and y =9