need help on question!!!!!! How did José de San Martín help Simón Bolívar defeat Spanish forces in Peru?

He drove out the remaining Spanish forces.
He started a war in Argentina to distract Spain.
He freed the neighboring colony of Colombia.
He gave Bolívar control of the city of Lima.