Firework B has a 0.25s headstart with a speed 240ft/s. The headstart distance for B is therefore, 60ft (= 240 * 0.25). Note, that we are assuming the effect of gravitational acceleration is negligible. In practice, the rocket will slow down due to force of gravity.
Firework A is then launched. Assume that it explodes after time t.
Distance traveled by rocket A = 320*t
This distance must be equal to the sum of the headstart distance for B, AND the additional distance B travels in time 't'. So
320*t = 60 + 240*t
Solve this to obtain
t = 0.75s
To answer the question asked "How many seconds after Firework B launches will both fireworks explode?" you must add the 0.25s headstart given to B. So the answer is
Time = 1.0s after B was fired.