Do you have stock shifter?
If the problem is the shift linkage, more than likely it can all be resolved from under the car without pulling the transmission.
I would not let anyone play with it if they do not know something about BMW's and 5 series manual transmissions.
From inside the car you can pull most of the parts and see part of what is happening and hear better to isolate the problem.
It can be a bit tricky, but if you take your time, not hard at all.
1. Pull shifter boot loose around the console, do not pull near the front left where the cut out is, pull fron the right side corner gently.
2. Unplug the connector for the lighted shifter knob.
3. Remove the shifter knob. This can be tricky without hitting yourself in the face or even possibly hitting the rear view mirror or windshield. The knob pull straight up, BUT, if the shifter cup is damaged, you may have issues. The shifter should not easily pull up and down in the shifter cup. Anyway, make sure your face is clear, you need to straight up sharply to remove the shift knob.
4. Once the shifter knob and boot is removed, remove the foam sound deadener piece.
5. Now you remove the rubber lower shifter boot. If the boot is a newer style, ther may be a green plastic ring that you can use to pull an edge up, usually the front edge. Be careful removing the boot and you may need to spray silicon to ease the boot over the shifter handle. If the boot is in bad shape, new boots are about $15 as I recall and are well worth replacing if there is any damage on the boot.
Once you have the knob, boot, sound deadener and the lower rubber boot out you can see the top of the shifter ball and you can also see the top of the shifter support. The shifter support should have some movement, there are 3 rubber bushings that support the shifter carrier and they do go bad contray to what anyone says. You should also see if there is anything broken or loose around the shifter ball. I have not see an OEM shifter, but I think there are plastic parts that can break?
You should be able to hear very well now and possibly see if something is not right. You can also take a small mirror and probably inspect the rear bushing. It snaps in the underbody of the car, I doubt it could have popped out, but anything is possible. The rear bushing should have a small amount of up and down play. If the shifter carrier moves side to side (rotates) much, then the front shifter carrier bushings are most likely dried out, hard and have shrunk.