It's quite easy, I've just done exactly that on both bogies of an old 2095.
The screws that hold the gearbox halves together are all on one side. You need to gently remove the wheels ONLY on that side (catching the pickup brushes as they try to spring out of course!), then remove the screws and lift off the gearbox half. Now, very carefully lift out the motor, being sure to catch the small ballbearings embedded in the grease at both ends of the motor shaft. Now, if the loco is too old to have the three-position isolator switch, the motor will not have any wires attached to it, but if the loco is slightly newer and has the switch, like my 2095 did, it will probably have one wire already attached to the motor via one of LGB's standard push-on connector terminals. Obviously you need wires on BOTH motor terminals, so you will need to solder either one or two on, covering the terminals with heatshrink at the same time. If you want to keep to LGB's colour code, then the two motor wires should be yellow and green. Now, in both halves of the gearbox there is the brass contact bus that connects the wheel pickups, skates etc; that has a vertical sprung strip that makes pressure contact on the motor terminals - if your motor had no wires already attached then there will be a contact strip in both gearbox halves, but if the motor already has one wire attached then the contact strip on that side will have been removed at the factory. Either way, you need to SNIP OFF the contact strip(s) to the motor - I've found that if you use a good pair of small side-cutters, you can actually get in there and snip the brass without having to completely remove the contact bus from the gearbox housing. Once this is done, then the motor ois electrically isolated from all the track pickups. All you need to do then is carefully reassemble the gearbox, remembering to put all the bits back where they came from, and leading the one or two new wires out through the top of the gearbox - you might need to snip away a few little bits of plastic to route the wires easily, and/or drill a small hole, as you prefer - just make sure that the wires don't get trapped and prevent the gearbox halves from mating properly.
Now, as it's from a two motor loco, both gearboxes will probably already have two track power wires attached (my 2095 had them soldered to the little brass pads that are visible at each end of the assembled gearbox) - these should be brown and white by LGB's standard wiring code. With the green and yellow wires from the now-isolated motor, you now have a four-wire gearbox ready to connect to the decoder!
I hope that makes sense, sorry that I don't have pics (I was so busy doing the job on the 2095 that I forgot to take any!) - but anything else, please ask!
Jon.