You haven't quite grasped it. When we say that X can cost as much as $100 more than Y, we mean that the cost difference can vary, depending on where you go that sells X and Y, up to a maximum of $100.
Where you say "... B, which costs less than $10," this does not fit the facts that B costs $40. You need to put "than A" earlier and change the word order:
"...B, which costs $10 less than A, and C, which can cost as much as $100 more (than A)."