The total cost came to 5,000 yen.

Literal

Costs [topic-は] in-total 5000-yen [into-に] became.

全部で means 'in total.' ~になった means 'became, came to' — here, the costs reached a specific amount. Half-width digits (5000) instead of full-width.