There are two screws at the top of the 'drive' mecahnism. Undo those.
Then, on the back, down in the trimmer adustment barel is a latch. Use an implement to release the latch and the whole top of the unit, adjustment barrel etc will pop out*. This allows the electronics housing to come out. Gently undo the clips on the electronics housing to open.
The plastic battery housing is soldered to the electronics (PCB) board via metal tabs welded to the batteries.
Use a soldering iron to melt the solder holding the tabs to the pcb - when molten, the battery housing should be levered away from the PCB. repeat on both sides until it is released. The batteries are lightly glued into the battery housing.
Remove the tabs from the batteries with pliers and a little heat from your iron.
Use similar size NIMH rechargeable battery, but you will need a bodge to secure the tabs to the battery, and a wire or metal strip will be needed to link the batteries at the other end. I wedged and then used hot glue. Resolder and re-assemble.