in 9
87+5x +y= 180
y=180 - 87 - 5x -------1
don't subtract here
y+10x +17 =!80 ( angle on straight line)
using equation 1
180 - 87 - 5x +10x +17 =180
5x - 70 =0
5x = 70
x =14
in 10
16x + 48 + y =180
y= 180 - 16x - 48 ------1
28x + y =180( angle on straight line)
using equation 1
28x + 180 -16x -48 = 180
12x - 48 =0
12x =48
x = 4
hope u understand..