We know that the angle in a straight line is 180 degrees.
Therefore,
40x - 4y = 180 (1)
20x + 16y = 180 (2)
Multiply (1) by 4, we get,
160x - 16y = 720
20x + 16y = 180 (from (2))
Adding, we get,
180x = 900

Substituting in (1), we get,
40(5) - 4y = 180
200 - 4y = 180
-4y = 180 - 200
-4y = -20