Let the total number of votes be x.
The number votes the defeated candidate got was 47x/100.
The winning candidate got 100-47 = 53% votes.
So the number of votes that the winning candidate got is 53x/100.
The winning candidate got 300 votes more than defeated candidate.
So,
47x/100 + 300 = 53x/100
300 = 53x - 47x /100
300 = 6x/100
30000 = 6x
x = 30000/6
x = 5000
Therefore total number of votes is 5000.