How do I do this, what the steps or equations

Let's call the number of votes the winner received [tex]n[/tex]. Remember that if he beat a candidate by [tex]a[/tex] amount of votes, then that candidate received [tex]n - a[/tex] votes. Essentially, a candidate received a total number of votes equivalent to the number of the votes the winning candidate beat them by subtracted from the number of votes the winner received.
For example, the first candidate was beat by 17 votes. Thus, he received [tex]n - 17[/tex] votes. Doing this for all the candidates and substituting the expressions into our equation, we get:
[tex](n - 17) + (n - 18) + (n - 25) + (n - 31) + n = 99[/tex]
(Don't forget the [tex]n[/tex] at the end of the equation because 99 votes is equal to the number of votes all candidates received, including the winner)
Now, let's solve the equation.
[tex](n - 17) + (n - 18) + (n - 25) + (n - 31) + n = 99[/tex]
[tex]5n - 91 = 99[/tex]
[tex]5n = 190[/tex]
[tex]n = 38[/tex]
The winner received 38 votes.