So in the photo below I believe the areas I have text are correct. My question now are the grounds
Ok, so your cord that runs in the wall for your dryer plug, how many wires does it have? 3-wire, or 4-wire? In either case, you only need 3.
If it's a 3-wire, use the 2 insulated ones, 1 for hot, other for neutral, and bare wire use for grounding. Usually we want to try an observe colors, but on 3-wire, you may have red, black, and bare, or you might have white, black, and bare. If it's a 4-wire, you would have red, black, white, and bare.
The general rule of thumb is, use black as a hot, white as a neutral, red as a second hot (when using 240v), and bare is always ground.
But suppose you have in your cable to your dryer plug, a black, and a white, and a bare for ground, well then perfect, our colors will all match. But if it is black and red and bare for ground, then I would use the black as hot (as normally would), but for the red wire, I would get some white electrical tape and wrap a bit of the wire insulation on each end to label it as a 'white' wire for future electrician who may go in there.
If your cord already has a black and a white in there (or whichever insulated pair you have), then in the main breaker box, wire the black wire to the one leg of the 30a dryer breaker, and use the white wire (or whichever other wire you designated as 'white'), connect that to the neutral bus in the main panel (where you see all the other white wires bridged in there), and the bare ground wire should already be grounded on the ground bus in that panel (where you see all the other bare wires bridged in there).
Then on the other end of the cable in the solar equipment room, I am not sure how you're planning to bridge it, I would prefer not to use the dryer plug cord to adapt it (as it may confuse future electrician, because the NEMA plug type is designed as a 240v dryer plug. I'm not going to tell you not to do it that way if you want.
Hardwired conduit type connection is better for everything, and it also makes any future inspectors not think to check things too closely if it all looks professional, if you had a box to put the the ATS inside of, then you could fashion a cover plate for the dryer plug panel (take out the dryer receptacle and use wire-nuts extend cable beyond), with a hole in the front of the cover plate (with a 90 degree bend adapter on it) and run flexible conduit or something, going over to the ATS box, but that's all up to you. I know some people who would just say screw it, use a dryer cord whip and call it a day. (ok, I gave my disclaimer)...
As far as the wiring goes, you just want to hook your grounding bare wire from main panel, and bridge it on the other end, to connect to any box/panel/device that has a ground lug, or a metal chassis. Electrical boxes usually always have grounding screws somewhere in them (green color screw usually). Basically, anything with a metal chassis should be grounded back to your main panel ground, which then connects outside to the copper grounding rod going down into the Earth. Don't ground anything on the neutral bus, they are both essentially grounds, but inside your house, the ground path must be different than your neutral return path.
So to sum it up, if you have a 3-wire on your dryer cable, you'll use all 3, except instead of 2 hots, you'll have 1 hot, 1 neutral, one ground. If you have 4-wire on your dryer cable, then one wire (the red one) will be un-used.