It cost me 5 dollars to buy the book.
I spent 5 dollars buying the book.
I spent 5 dollars on the book.
I paid 5 dollars for the book.
It cost me 5 dollars to buy the book.
I spent 5 dollars buying the book.
I spent 5 dollars on the book.
I paid 5 dollars for the book.