I need help finding the value of x for these problem?

ANSWER
No 3. x = 41 degrees
No 4. x = 6.5 degrees
EXPLANATION
Question 3
Note: One of the angles in a right triangle is 90 degrees. As a result, the sum of the other two angles is 90.
That is:
[tex]\begin{gathered} 45+(x+4)=90 \\ x+4=90-45 \\ x=45-4 \\ x=41^0 \end{gathered}[/tex]Question 4
Note: The sum of angles in a triangle is 180
That is:
[tex]\begin{gathered} 31+97+8x=180 \\ 128+8x=180 \\ 8x=180-128 \\ 8x=52 \\ x=\frac{52}{8} \\ x=6.5^0 \end{gathered}[/tex]