Remove any dirt and debris in the cracks, using a vacuum cleaner.
Cut the polyurethane foam to the size of the crack. Press the foam into the gap so that it is recessed 1/4 inch lower than the surface.
Cut the tip off the urethane caulk tube at a 30-degree angle to make the opening of the tube the same size as the gap.
Insert the caulk tube into a caulk gun, and press the trigger till caulk comes out. Insert the end of the tube into one end of the gap, and press the trigger to make an even bead. Run the caulk gun from one end of the crack to the other end, using an even motion to keep the bead size uniform.
Smooth the caulk into the gap with the back of a spoon, wiping the spoon clean with mineral spirits poured into a rag as necessary. Allow the caulk to dry for 24 hours.