Not certain that I understand your problem, but
1) Purchase a front hub motor and don't worry about whatever type of rear gears that you have.
2) Rear hub motors have either a cassette or freewheel so when you pedal, you assist the motor, or the motor can operate and you don't need to pedal.