Answer
$d_{min} = \frac{v_0^2}{2g~\mu_s}$
Work Step by Step
While the small box rides on the large box without slipping, the force of static friction provides the force to bring the small box to rest. We can find the maximum rate of deceleration that the force of static friction can provide for the small box as;
$F_f = ma$
$mg~\mu_s = ma$
$a = g~\mu_s$
We can find the distance $d_{min}$ it takes to stop when the magnitude of deceleration of the system is $g~\mu_s$;
$d_{min} = \frac{v_f^2-v_0^2}{-2g~\mu_s}$
$d_{min} = \frac{0-v_0^2}{-2g~\mu_s}$
$d_{min} = \frac{v_0^2}{2g~\mu_s}$