Connect the positive wire from the controller to the positive of one battery and the negative from the controller to the neg of the OTHER battery.
Remember, you are not going to get all 40 watts but for a very short time each day and on cloudy days, an even shorter time. 40 watts is MAX, not continuous, and that isn't even considering loss in wiring and probably around 90% to 95% efficiency which is the industry standard.
2013 Silverado 2500 HD Duramax/Allison Tuned
Aviator Wright Flyer #1919
"First In, Last Out". 11B4Y
DAV, MOPH, VFW, 5/7 Cav,1/8 Cav Assoc.
11th ABN Pathfinder Co. N7MIP