Let the length of the inclined plane is =l. So only ‌
l
2
part will have friction. According to work-energy theorem, W=∆k=0 (Since initial and final speeds are zero) ∴ Work done by friction + Work done by gravity =0 i.e., −(µmg‌cos‌φ)‌