Some clarification please: Is a 4 AH load supposed to be a load that will draw 4 Amps from a battery for one hour before the battery dies? That's what I would expect it to be.
V=IR, so 24=(4)(R); R has to be 24/4 or 6 ohms. P=VI so a 40 W=24/I = 1.66 amps >>> R = 24/1.66 =14.45 ohms
1/Rt=1/R1+1/R2
1/6=1/14.55+1/R2
Solve for R2, will tell you the additional resistance you need. By inspection, it also tells you that R2 has to be less than 14.55.
Cavat: The 40W bulb better be rated for 40W at 24V.