The second formula can be changed to X=7Z-2Y.
Enter the first formula.
28Z-8Y-3Y-6Z=0
22Z- 1 1Y=0
Y=2Z
Bring this formula into the first formula.
Then X=7Z-4Z.
X=3Z
So bring the required formula.
(45z^2+8z^2-z^2)/( 18z^2- 12z^2- 10z^2)
=(52Z^2)/(-4Z^2)
=- 13