I take it this is talking about a hypothetical election for the House of Representatives, because it’s mentioning districts.
Remember that the U.S. uses a winner-takes-all system and that the plurality of votes gets the representative.
Democrats gained 3
Republicans 2
Socialists 0 (who would’ve thought)
So then: A=3, B=2, C=0.