The angles of a triangle all add up to 180°. In fact, it can be generalized that the sum of the interior angles of an n-sided polygon is equal to 180°(n–2).
A right triangle must have a right angle, which is equal to 90°. If the other angle is 42°, that means that we can find the third angle by subtracting 90° + 42° from 180°.
x = 180° – (90° + 42°) = 48°