One is right compound: calculated from left to right. Like you said, compound relationship.
The other is left compound: calculated from right to left. As you said, composite function.
In fact, the composite function can also be right composite, and the composite relationship can also be left composite. Different books have different choices. Just look up the description of the book.