i replaced both batteries ,and now i get red warning telling me to drive to shop, can't get out of park to drive to shop
Hmmm, you are in a bit of pickle!
A mechanic will review the car and probably look at these following
1. Ignition key tumbler might be faulty.
2. Another thing a mechanic will look at is a broken transmission cable. This might be why the car is not changing gears
3. Maybe there is a bad, shift interlock solenoid. A shift interlock solenoid is a a feature in all modern cars and is a safety feature that prevents shifting out of park with pressing down on the brake.
I would double check the auxilary battery connectons. That is the one that control the shifter as the W251 has shift by wire technology.
Let me know if that helps.