look at this like a right triangle with a height of 32 M and the angle at the base of 22 degrees
The distance from the boat to the lighthouse would be the base of the triangle
to find the base given the height and angle given the formula is
x = height / tan(angle)
x = 32 / tan(22)
x = 79.2 Meters