Will give brainliest answer

Answer:
71
Step-by-step explanation:
An exterior angle of a triangle is equal to the sum of the opposite interior angles.
You see that ∠EHI is an external angle of triangle BHD
=> ∠BHD = ∠B + D
=> ∠BHD = 40 + 31 = 71 or ∠x = 71