@The Panda what you are describing used to be a pretty common alteration, which also included spreading the rear triangle as you describe. The 145mm measurement you gave us tells me you had one of the early 350w plastic-cased single speed motors. So did I on my 2015 Sondors Original and I did the same upgrade, although I kept the single speed and used a spacer, then went big on the front chainring (60T) and used a Surly Singleator chain tensioner. This worked for me since I lived on flat ground.
Sondors does not have any correct parts for this. It was strictly a hack and the only thing Sondors did was take note of the very common practice of doing this (it started out as a 3-speed freewheel upgrade) and then change the Original to have the wider rear stays, and then using the new frame specs, create an upgraded X model that had speeds. Eventually all of the Originals (aka The Fatty) had speeds.
There are a couple of ways to do what you want. One is to buy a cheap derailleur that has a hanger on it from the factory. This is almost certainly going to be a cheap Shimano. The other is to get hold of a standalone hanger and then put a better derailleur on it. Its pretty much a generic part.
Here is a standard-issue generic derailleur hanger. you would use the rear nut to extend thru the horizontal dropout. Run it thru and put a washer and nut on the other side to clamp to the bike frame. Or just let a bare bolt end do the trick. For less than 4 bucks you can just buy it and tinker.
Derailleur Hanger Plate with Nut and Bolt. SR-5501
www.performancebike.com
Here is an example of a 'Shimano' derailleur with the hanger built into it. Derailleurs like these are the epitome of cheap crap. When I did the cassette version you see below
I used a SRAM X3 which is still only $27, with $15 shifters. Much better than any Shimano but they do work differently so you have to have matching derailleur and shifter. I did 9spd but the X3 is also 7spd compatible.
If you have the EBW 7-speed, which is a freewheel which means the motor is the threaded kind, then go the cheap route. There's not much point spending money and effort upgrading to say a 9-speed. If you really have a cassette motor then I'd go with a 9-speed cassette. There is a mod needed to get a cassette tool over the plug (resurface the captured nut on the axle to a smaller size with a file.... Yes really. It actually works well), and you will also need to file down the diameter of the anti-rotation washer).
If you haven't learned this already take note: It is not possible to remove the freewheel (or a cassette) because of the plug on the motor keeping you from placing a freewheel removal tool over the big 750w plug (unless the use of the new Bafang plugs now makes this possible). You will need to either take a dremel to a standard freewheel removal tool, cut a slot in it and then use a screwdriver to brace the tool so you can remove the freewheel if you ever want to do that, or go to Area 13 Ebikes and buy the tool they make and sell that is designed specifically to get around this problem.