My apologies if I have misunderstood the question, but connecting the output of a secondary battery to the charge input of the primary would not work "in the field" most, if not all such batteries include a BMS (battery management system) this limits the charge current, often not more than 2A (to avoid damage and fire etc). The primary battery output (when running the motor) should be in the region of 10A (36V 10A will provide 360W). In short, you'll be filling a bucket with a thimble. If you're adamant that you will run a secondary battery, you may find it beneficial to find the primary input on the controller, attach the second battery in parallel, et voilà, more range. If you need further support with this, I'll be happy to help, not to blow my name own trumpet but.. I have some silly letters after my name, mainly BEng.
I neglected to mention, a 36v ebike battery is 36v nominal, the charger is 42v continuous, so if you do charge using a second battery, you'll get charge when the battery is 42v to around 41v after that, the second battery will be sat doing nothing as the primary battery BMS won't even realise it's being charged.