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