Foam-assisted chemical flooding for enhanced oil recovery