If the selector lever will not move from P using the proper shift procedure, continue to hold down the brake pedal.

Take the vehicle to an Authorized Mazda Dealer to have the system checked.
Shift-Lock System
Manual Shift ModeSafety Practices
The way you drive has a great deal to do with your tire mileage and safety.
So cultivate good
driving habits for your own benefit.
Observe posted speed limits and drive at speeds that are safe for
the existing weather
conditions
Avoid fast starts, stops and turns
Avoid potholes and o ...
On/Off Solenoid Removal/Installation [Fw6 A EL]
WARNING:
A hot transaxle and ATF can cause severe burns. Turn off the engine and wait
until they are cool.
Always wear protective eye wear when using the air compressor. If the air
compressor is used, any particles of dirt or soiling could spatter and get into
the eyes.
...
Oil Seal (Differential) Replacement [C66 M R]
1. Remove the aerodynamic under cover No.2 and the splash shield as a single
unit..
2. Drain the manual transaxle oil..
3. Disconnect the drive shaft (LH) from the MTX..
4. Disconnect the drive shaft (RH) from the joint shaft..
5. Remove the joint shaft..
6. Remove the oil seal (LH).
...