1/3 of 12,000 ballots were thrown out.
1/3 * 12,000 = 12,000/3 = 4,000
4,000 ballots were thrown out.
12,000 - 4,000 = 8,000
There were 8,000 ballots left.
1/4 of 8,000 ballots are for candidate A.
1/4 * 8,000 = 8,000/4 = 2,000
Candidate A received 2,000 votes.
8,000 - 2,000 = 6,000
Candidate B received 6,000 votes.