You can rig up an affordable e-bike to handle a 25% slope.
The two bikes that you want to work with are good in that they have 20" wheels = better climbers, bad in that they are aluminum frame = stripped drop outs could be a problem. Adding a torque arm would be essential, I believe, but more knowledgeable people can give better advice.
Easier problem to solve with a mid-drive. Why must you swap the power between both bikes? KISS? Just electrify one and use the other with pure human power.