Lets say you have a book site and are trying to target the keyword/phrase "buy x book".
Url 1: BuyBook.com/harry-potter
Url 2: BuyBook.com/buy-harry-potter-book
Does url 2 hold more seo weight because it has the keywords 'buy' and 'book' at the end of the URL? or is it the same as URL one since it has those words in the root domain? ...
I just gave a fairly detailed answer about how keywords work in another thread if you want to read it.
Need some click bank advice. My replies in that thread might help you understand keywords a little better.
Here's a brief answer for your specific question in this thread.
Yes Url 2 would carry more weight targeted for the keyword/phrase "buy x book".
Both Url 1 and Url 2 carry equal weight targeted for the keyword 'Harry Potter'
That's why longtail keywords are so important. In doing so you are targeting every part of the phrase.
Url 2 carries equal weight targeted for 'buy harry potter book', 'buy harry potter', 'harry potter book', 'harry potter', 'buy harry book', 'buy potter book', 'buy book', etc. The more complete the phrase someone types in the search box, the less the competition is for your keyword.
In other words, Url 2 is totally relevant for the keyword 'Harry Potter' but there's a lot of competition for sites containing that keyword. It's also totally relevant for 'harry potter book', there's still a lot of competing sites containing the complete phrase. Finally, it's definitely totally relevant for the phrase 'Buy Harry Potter Book', there's much less competition for that keyword than there is for just 'Harry Potter'.
So as long as a keyword phrase contains a term, then it as just as relevant for that term as if it had that term only. But by using the complete phrase it's also relevant for everything else in the phrase as well.
Hope that helps.

irate:
edit-
For PatchesDM - actually the term will still be relevant regardless of the order of each word, but typically it's still a good idea to keep it in the order you're expecting people will type it into the search box.
OP - I just looked at the urls again, and get more what you're asking now. lol
Since the domain contains buybook, then yes the url buybook.com/harry-potter does contain 'buy harry potter book'. Actually it contains buy and book twice. Just add that info into what I explained above and you'll see the result is it will carry the same weight as any other site with 'harry potter' in the url, but will carry a little more weight than other sites with 'buy harry potter book'.
The danger of that is regarding keyword stuffing. In your particular example there isn't really a problem with it, but you would definitely want to avoid something like:
buybook.com/books/harrypotter/harrypotterbooks/buy-harry-potter-book