Does gravity matter when calculating work done horizontally? My teacher gave the following question:
A 212lb running back can complete the 40yd dash in 4.53s. What time would a 198lb running back have to post in order to be more powerful?
My teacher says that I should set the power of each runner equal to each other as: (m1)(g)(d)/(t1)=(m2)(g)(d)/(t2) and then solve for (t2).
All of this makes sense to me except gravity. If the direction of motion is horizontal, why are we using gravity to determine the force? I thought that a component of the force had to be in the direction of motion, and gravity is perpendicular to our running backs motion.
 A: So let's do this the right way.
We are told the time $\Delta t$ it takes to run the set distance $\Delta x$. Let's assume a constant applied force $F$ and that the person starts at rest.$^*$ Then we know the following equation is true (constant acceleration equation of motion with Newton's second law).
$$\Delta x=\frac12a(\Delta t)^2=\frac12\frac Fm(\Delta t)^2$$
Therefore
$$F=\frac{2m\Delta x}{(\Delta t)^2}$$
And so the work done is
$$W=F\Delta x=2m\left(\frac{\Delta x}{\Delta t}\right)^2$$
Therefore, the average power is given by
$$P=\frac{W}{\Delta t}=\frac{2m(\Delta x)^2}{(\Delta t)^3}$$
Through using this equation you can determine the power of the first person and determine what time the second person needs to run the distance in to have more power. I will leave this to you.
Additionally you are correct that $g$ should not appear here. This is because gravity has no influence on horizontal accelerations (unless you want to consider friction, as pointed out in the comments. But that is an indirect effect of gravity, and in this problem irrelevant since we will assume running without slipping so that we know $F\leq\mu mg$).

$^*$Of course this is not how we actually run certain distances. We typically accelerate over a shorter time and then go at our constant maximum speed for the remainder of the run (assuming maximum effort). My answer also neglects the more complicated physics of running, where gravity could have more of an effect. However, we are not given any additional information, so this is the simplest set of assumptions we can make here.
A: First of all, I agree with @Aaron Stevens answer. The work done moving horizontally has to be equal to the force in the horizontal direction times the horizontal distance through which the force acts.  But you still might ask, why doesn’t gravity matter? Why did the teacher include gravity?
Surely, every stride we do when running requires us to push off the ground. This requires effort to lift us off the ground, and certainly the expenditure of energy, on our part. And the heavier we are, the more effort. Unfortunately, that effort doesn’t result in actual work being done in the horizontal direction. 
A similar situation exists when looking at the work done in elevating ourselves in the gravitational field.  We can take a ladder and reach a height $h$ above the surface of the earth and the work we do is $mgh$. If, however, instead of taking the ladder, we walk around a large diameter spiral staircase so that we take many more steps to reach the same height $h$, it may feel like a lot more work, but the actual work done will be the same, $mgh$.
Bottom line, I think the teacher may be confusing physical effort with mechanical work done. They are not always the same.
Hope this; in addition to @Aaron Stevens answer, helps.
