She already paid $5, and then she bowled 4 games so 4x represents the four games she bowled and how much she payed for them. The total cost was 18.
5 + 4x = 18
Subtract 5 from both sides:
4x = 13
Divide both sides by 4
x = 3.25
So she paid $3.25 per game