The two angles when added together need to equal 180 degrees:
-4x +5 + -13x +39 = 180
Simplify:
-17x + 44 = 180
Subtract 44 from each side:
-17x = 136
Divide both sides by -17:
x = 136 / -17
x = -8