I’m not sure what their models are but they are both rear hub motors.
I have a Cube Kathmandu Pro 625 that has no problem with even the worst hills. I would recommend a mid drive such as the Bosch CX4 or equivalent with at least 80nm torque and a good gear range. That’s why I suggested a Cube...