(a) Retardation due to friction
$a = \mu g = (0.25)(10)$
$= 2.5\ ms^{- 2}$
Collision is elastic, i.e. after collision first block comes to rest and the second block acquires the velocity of first block. Or we can understand it is this manner that second block is permanently at rest while only the first block moves. Distance travelled by it will be
$s = \frac{v^{2}}{2a} = \frac{(5)^{2}}{(2)(2.5)} = 5$m
$\therefore$ Final separation will be ($s - 2$)=3 m