Step 2
Select all four rectangles and create a Blend by going to Object > Blend > Make (Alt-Control-B). If you've not gotten a smooth gradient of colour, then keep the Blend group selected and go to Object > Blend > Blend Options and change the Spacing to Smooth Color.