You bought a magazine for $5 and four erasers. you spent a total of $25.
Magazine cost: 5$ each Eraser cost: X$ each
Total cost is the number of items (1 magazine) times the cost of each item (5$). We don't know the cost of each eraser, so we represent that using a variable, X.