Bolívar, the Liberator of the North, and San Martín, the Liberator of the South had rushed both to Guayaquil. They both come from long battles fought to free South America from the Spanish rule, but the task is not complete. Still many places are loyalist, mostly the Peruvian mountains.
Bolívar and San Martín are both ambitious leaders. Bolívar has freed New Granada, Venezuela and Quito. San Martín has done the same with Rio de La Plata, Chile and Lima. Now, the way history will develop will depend on how they agree to join efforts for that last push.
The 26th July 1822, they finally met at Guayaquil. They interviewed in private, and they did shared later with other people what they talked in that interview. San Martín, however, wrote several years later that he was almost convinced to retire to Paris letting Bolivar march over Lima and liberate Peru. Probably history might have been different if that had happened, but we can only speculate if by those actions, Miranda's dream on a united Hispanic America might have become a reality.
The fact is that, after the interview, San Martin returned to Lima, resigned as Protector of Peru, and took a boat trip back to Buenos Aires.
San Martín knew that President Rivaravia distrust him. San Martín had gained too much military prestige and would rival any other leader in the United Provinces of Rio de La Plata. Besides, his ambitions to become an emperor under the model of Napoleon had not been secret.
San Martin was a clever man, however, and before he came to Buenos Aires, he prepared his arrival ensuring Rivaravia that he would not get involved in any internal power strugle in Rio de La Plata. He came for a higher mission, a mission that was above any political temptation. A mission that was forged by Miranda and transmited through Bolívar, and now through San Martín.
Some historians had argued on the true nature of San Martín. Some believe that San Martin was true and that he was sent by Bolívar to ensure that Río de La Plata joined the planned Hispanic-American Union, but most believe that San Martín just wanted to preserve his possition against the Bolivarian imperialism. The later foundation of a new nation on his name helps preservating this thesis.