Use SOH-CAH-TOA:
Height of the flagpole = Opposite side of the angle.
Length of the shadow = Adjacent side of the angle.
Opposite / Adjacent = O / A = Tangent of the angle (TOA).
Tangent inverse of (22/62) ≈ 19.5 degrees, or 20 degrees, rounded to the nearest degree.