When a quarterback slides feet first, is the ball spotted at the feet or where the ball is held in the hands, which could be 2 or 3 feet behind the feet?
As of 2018 the ball is spotted from the position at which the quarterback initiates the slide. This applies on any type slide or dive, for any ball carrier. So in this case, when the quarterback slides with the ball in his hands, the ball is spotted at the yardage it was when his body first contacts the ground, which is usually his thigh, shin or knee.
Here is an explanation by the NFL's competition committee regarding the ruling on ball carrier sliding:
(1) “If a runner (including a quarterback) gives himself up, then he is down where the first body part touches the ground. The runner should not benefit from additional yardage after the first body part touches. Defenders do not have to go down to initiate contact to stop a runner from gaining more yards after he contacts the ground.”
(2) “Quarterbacks and all runners should be reminded that they must give themselves up early, and that if a defender has committed to a tackle, contact may occur. However, that contact cannot be late or to the head or neck area of the player who gave himself up.”
(3) “A quarterback does not have to slide feet first to be considered to be giving himself up. Regardless whether the slide is feet first or head first, as long as he gives himself up, he should receive the protections afforded to him as a player in a defenceless posture.”
This rule was added to give more protection to the ball handlers, make them treated the same when giving themselves up via feet first dive or head first dive.
Please see my comments in my answer here - When a QB slides, is it considered a dead ball?
For your specific question of a QB sliding feet first. The ball should be spotted when he starts his slide where the ball was at that point. Not when a shin or thigh or anything else hits.
The other answer is simply incorrect. One could even go as far as saying that whenever the QBs feet land for his slide that is the point where the ball is dead (where the QB has the ball being relative).
But that would also be wrong. An athletic QB could easily slide high (think flying front kick) and gain at least 1-2 yards while in the air. When the QB is in the "sliding" position he is not allowed to be hit so it would be completely inaccurate for a referee to mark the ball at the spot where the QB landed first when the defense wasn't allowed to hit him.
Rule is simple - start your slide and ball is dead... Ball spotted right were it was when slide started. That is why you see some smart QBs like Rodgers stick the ball out front on slides (this rule needs to be changed too as it is ridiculous near sidelines).