This can be approached in a variety of ways. You can describe the height of the car on the ferris wheel (assuming the lowest point is y = 5 m) as y = y0 + R(1+sin(2πt/T)) where R is the radius of the wheel, T is the period, and we choose the angle pointing downwards from the center to be 0 (If you wanted to use the normal math angle where horizontal is 0, the function would be sin(2πt/T+ π/2) because θ0 would be -π/2)
So your equation is y = 5 + 38(1+sin(2πt/6)) with t in minutes and y in meters or y = 43 + 38sin(θ)
Solve for θ's that give you y=54. The two angles will be θ and 2π-θ. Solve for t's (2πt/6 = θ) and take their difference to get the time interval.
Please consider a tutor. Take care.