Friction help

It is sometimes claimed that friction forces always slow an object down, but this is not true. If you place a box of mass M on a moving horizontal conveyor belt, the friction force of the belt acting on the bottom of the box speeds up the box. At first there is some slipping, until the speed of the box catches up to the speed v of the belt. The coefficient of friction (greek letter mu "looks like a u") between box and belt is . Do not worry about italics. For example, if a variable g is used in the question, just type g and for (u) use mu.

I have 2 questions that do not have numbers, just have to solve for an equation.

(a) What is the distance d (relative to the floor) that the box moves before reaching the final speed v? (Use energy arguments to find this answer.)

(b) How much time does it take for the box to reach its final speed?

The attempt at a solution

not sure how to start. i figured conservation of energy. also the block will experience -mg force, it will have normal force cancelling it out. so then only force is friction force due to belt. this is where i get stuck. also not sure if i have to factor in change of thermal energy or not. anything with friction with have change in thermal.
any help would be great
thanks

Until it comes to rest on the moving surface there is a force acting on M that is equal to the force of friction.

F = μ*M*g

This force will accelerate M until it is going at the speed of the belt.

Since F = m*a

then you can figure how fast it accelerates. Armed with acceleration you can write an equation from kinematics that relates this acceleration and the velocity of the belt to distance. Likewise the time based on velocity and acceleration.

kinetic energy is = 1/2mv^2
delta(E) = w+q i said q is 0
so delta(E) = w delta(E)= KE (1/2mv^2)
w=f*d so
1/2mv^2 = (m(u*g)) * d
solve for d i get
d= v^2/2g
where did i go wrong? this is the wrong answer

kinetic energy is = 1/2mv^2
delta(E) = w+q i said q is 0
so delta(E) = w delta(E)= KE (1/2mv^2)
w=f*d so
1/2mv^2 = (m(u*g)) * d
solve for d i get
d= v^2/2g
where did i go wrong? this is the wrong answer