what is x please help

Answer:
x = 71
Step-by-step explanation:
Given the triangle in red, we can find the unknown angle since the sum of the angles of a triangle are 180. Call the unknown angle GHI
B+ D+ GHI = 180
31+ 40 + GHI = 180
71 + GHI = 180
GHI = 180 -71
GHI = 109
We know that GHI + x = 180 since it forms a straight line
GHI + x =180
109 + x = 180
x = 180-109
x = 71