The cost should be zero for a warranty replacement,,,,,if you have over 50,000 miles on the vehicle it’s your dollar..
It’s very unusual to replace cams in any Mercedes engine unless there are other problems that caused it to go bad. Labor for internal engine work will be at least 20 hours, plus parts, so the cost would be well over $3,000., and depending on the reason it needs to be replaced, it would probably be a lot higher.
A 2007 Mercedes Benz is under warranty for internal engine parts. If you are changing to an aftermarket performance cam, it will void your warranty and you will never have the performance the stock German engineering provided.
Which MBz are we talking about? MBz makes several different engines, in 4 cylinder, 6 cylinder, 8 cylinder and 12 cylinder. The complexity of the 12 cylinder engine must be ten times as intricate as the 4 cylinder engine, and a single camshaft replacement cost about 10% of the cost of a changeout of camshafts in an engine with four camshafts. My guess is: it will be expensive no matter what you do.
Assuming you have less than 60,000 miles, it should cost you nothing, $0. The car has warranty.
It all depends on what Mercedes you’re driving?