It's the seat tube length that you should be measuring in the pic, downtube doesn't matter. I am pretty sure that there isn't room for a frame mounted engine. I have offered up my 66cc (the generic 2-stroke chinese engine) to a couple of bmx 20" & 24" and 24" jump bike frames and it is not even close to fitting those. Plenty of room inside the MTB/road hybrids though.
I personally don't like rack mounts. Soo... I think the Sick Bike Parts electric motor & shift kit with a great big triangle battery pack in the frame would suit your needs. If you can afford a battery pack that gives you the range you want. I don't know what range you want or whether electric is practical for you.