In a right triangle, the acute angles are complements of each other. This is true because the sum of angles in a triangle is 180°, and one of the angles is a right angle (90°). That means the sum of the other two is 90°, making them complements of each other.
M = 90° - N = 90° - 54.7°
M = 35.3°
___
Tan(54.7°) = n/m . . . . . . from the definition of the tangent of an angle
n = m·tan(54.7°) = 127·1.41235
n ≈ 179
___
Cos(54.7°) = m/p . . . . . . from the definition of the cosine of an angle
p = m/cos(54.7°) = 127/0.57786
p ≈ 220