Which "it" are you referring to?
Originally Posted by sara88
If the second "it" - it is worth it - in your example it is referring to the fact that although it is expensive, the cost is not important as the book is valuable.
Learning English is hard work, but it is worth it to find a better job. >> it is worth all the hard work in order to find a better job.
The journey took a long time, but it was worth it in order to see Fujiyama >> it is worth the time spent on the journey in order to see Mt Fuji.
The book was expensive, but it was worth it. >> It was worth paying a lot of money for the book.