F=mg sinθ now break f into perpendicular components.
here fsinθ will act in downward drtn. and f cosθ in a direction perpendicular to motion.
so the work will be done by f sinθ.
work done=mgsin2θ * h
h = height travelled in time t
h = v t
Hence
Work done = mg vt sin²θ