This looks like a system of simultaneous equations.
h-g=0.4 so g=h-0.4 and g=3h-20 becomes h-0.4=3h-20, 19.6=2h, so h=9.8.
g=h-0.4=9.8-0.4=9.4. Solution is (g,h)=(9.4,9.8).
To solve using matrices:
Rewrite the equations: g-3h=-20, -g+h=0.4.
In matrix form the equations become:
( 1 -3 )( g ) = ( -20 )
( -1 1 )( h ) ( 0.4 )
First work out the determinant D:
| 1 -3 |
| -1 1 | = (1)(1)-(-3)(-1) = 1-3 = -2, so D=-2.
Find g:
| -20 -3 |
| 0.4 1 | = (-20)(1)-(-3)(0.4) = -20+1.2 = -18.8, g=-18.8/D = 9.4
Find h:
| 1 -20 |
| -1 0.4 | = (1)(0.4)-(-20)(-1) = 0.4-20 = -19.6, h=-19.6/D = 9.8