The free-body diagram of the box has been drawn below:

Here, the normal force N is acting upwards and the weight of the box mg is acting in the downwards direction. The frictional force f is also acting in the left direction.
As the box moves in the direction opposite to that of the truck.
F = -ma
Here, F is the force exerted, m is the mass of the box and a is the acceleration of the box. The net force is negative.
The equation of the frictional force is expressed as:
-f = - ma …(i)
Here, f is the frictional force.
The equation of the frictional force is expressed as:
Here, is the kinetic friction and is the acceleration due to gravity.
Substitute values in the above equation-
Here, a is the acceleration of the box.
Substitute the values in the above equation.
The equation of the time required to travel the distance is expressed as:
Here, d is the distance traveled by the, u is the initial velocity of the truck and t is the time required to travel the distance.
As the truck was at rest initially, the initial velocity of the truck is zero.
Substitute the values in the above equation.
Thus, the box falls off the truck in1.57 s .