How in the world is it possible to fit a motorized bike on a 4 inch wide wheel?

One side of me says that I shouldn’t do it because it’ll be so difficult I’ll burn my brain as I’m trying and give up, but another says that it’s a cool idea to shift and have that speed when you need it and also have torque the most when you need it.
Here's the general idea.

Your pictures do not show how your sprocket is attached to the wheel. How many teeth on it? Either way you need a jackshaft so mount that first and start out simple with a single sprocket. After you get the bugs worked out and have a feel for it you can upgrade to a "shifter" set up later on.
S3x build thread. Those hubs are not cheap.

S3x build thread. Those hubs are not cheap.

That's the thread I've been looking for. Thank you.

I now realize you'd have to use the transmission with a jackshaft to clear a 4" wide tire though. This is because the sprocket driving the wheel is to the inside instead of the outside. So there'd be 3 chains in use.
I'm planning on doing the Fairbrother conversion of a 3 speed AW to a 2 speed fixie hub. You can pick one up for 30-50 dollars. That and a couple hours of grinding with a dremel sound a lot better than the ebay prices I see.
So I’m fitting an Avenger 85 on my 26” Takara Nobu Fat Tire Bike made by Kent (not the most reliable but it’ll do for the years I can save up), and as I’m putting the chain, I start realizing that I’m going to run into a big issue. Before with another bike that had a size of about 1.95” tires, it’s not that big of a deal because the tires are thin enough that they can allow the chain to go by no problems. When this bike has double that amount, the chain on the engine side rubs all over the tire sidewall and makes squeaky sounds as it passes by. How can I get around this so that I can test the A85 as soon as possible?
I tried offsetting the rear sprocket and it fortunately does give enough clearance, but another big issue now is the engine sprocket and it’s not aligning to the rear sprocket. Was this a good idea? What can I do?