Capacitor to provide energy to solenoid
There is an equation but 3 Amps at 12V for 3 seconds is a lot. You get somewhere around 4 Farads (Vo=12, Vt=10, R=4, t=3). There are supercaps (Double Layer Capacitors) but they have very low voltage. Thus you would need about 4..6 of them each costing around $10..$15. 

Maybe just a small re-chargeable battery would be simpler. 



Reply to comments (More readable here)
First: driving home in may car I realized my calculation is a bit off. As you stated the capacitor(s) only have to deliver the missing 1.5A not the full 3A (R=4) I used. Thus the capacitor value can be ~2F. 


  should I put it in series with the paralel solenoids, or should it be in series


The capacitor(s) have to operate in parallel with the power supply but you can't just put them there directly as they may look like a short when they are empty. (when you switch on). I have thought about using resistors &amp; diodes and switches but I do not see a simple solution. Every one of them fails as soon as the capacitor voltage drops below the supply voltage when it discharges, as at that point the supply will try to keep giving 12V and starts trying to deliver the full current.  

It is possible if you use the supply for one solenoid and a capacitor plus switch to drive the other one solenoid:







simulate this circuit &ndash; Schematic created using CircuitLab

But maybe somebody else has better idea