If we don't worry about the wheel's starting position, we can model it with this kind of equation:
y = a sin(bx) + d
a is the amplitude; it tells you how far the cart rises above (and falls below) its center position.
b is the frequency; it tells you how fast the cart oscillates back and forth.
d is the midline, or median, or offset - depends who you're talking to. It tells you where the center position is.
=== Stop here and see if that helps. Keep reading if you're still stuck. ===
a is 35m, because at the top the cart is 35m above its center (the axle) and at the bottom it's 35m below.
d is where the center is; in this case, 37m.
b is either 2pi divided by the period (time for one revolution) or 360 degrees divided by the period. I recommend you use the 2pi. So if x is the time in minutes, b will be 2pi/5 = 1.257. When you're laying out the equation, make sure you do the "Let statements" someplace - "Let x represent the elapsed time in minutes" or whatever.
So I believe your equation is h(x) = 35 cos(1.257x) + 37.