The 3 angles in a triangle need to equal 180 degrees.
the square in the top right means it is a right triangle and that angle = 90 degrees.
The other 2 angles then need to equal 180-90 = 90 degrees.
Now we have n + (n+40) = 90
Remove the parenthesis and add the 2 n's
2n + 40 = 90
Subtract 40 from each side:
2n = 50
Divide both sides by 2:
n = 50/2 = 25 degrees