Try and do it without taking the wheel completely out, that way there is no need to diconnect the motor, just loosen the wheel in the cutouts and lift the axle enough to slip the tube out if replacing it.
If mending it there is no need to even loosen the back wheel.