The horse applies 2 forces on the man. One is the normal reaction force vertically upwards to balance the weight of the man due to which work done is 0 since there is no displacement of the man in the vertical direction. Another force is the force of friction between the man and the horse in the horizontal direction which makes the man move forward along with the horse. Note that when the horse starts moving forward, the man tends to slip backward which is opposed by the frictional force which acts in the forward direction and hence opposes motion of the man relative to the horse. Let the frictional force be f and displacement of the man be d. Then work done on the man by the horse = fd.