Because every student studies at least one of the two languages, the count studying French plus the count studying Spanish minus the count studying both equals the whole class of 40. In symbols, F + S − both = 40, so both = F + S − 40.
(1) alone: F = 28, but with S unknown the overlap F + S − 40 is not fixed. Insufficient.
(2) alone: S = 25, but with F unknown the overlap is not fixed. Insufficient.
Together: both = 28 + 25 − 40 = 13. A single value. Sufficient.
The fact that no student is outside the two subjects is what makes the everyone-studies-one rule turn two enrollment counts into the exact overlap. Answer: (C).