I know from this question that the following two sentences:
- J'achète un livre à mon ami
- J'achète un livre pour mon ami
Can both potentially mean "I am buying a book for my friend"; that is, I intend to give the book to my friend, or in other words, my friend is the person who will benefit from the action of buying the book.
(I also understand that each of these two sentences can each have a different meaning, that the other sentence cannot have; "à mon ami" can mean "from my friend", ie, that my friend is the one who is selling me the book"; and "pour mon ami" can mean "on behalf of my friend", for example that my friend was too busy and asked me to buy the book on their behalf).
I am wondering if there are nuanced differences (in meaning or in usage) between these two sentences when they mean "I bought a book for my friend"? Or, are they exactly equivalent?