Crito
The dialogue takes place in Socrates' prison cell, where he awaits execution. He is visited before dawn by his old friend Crito, who has made arrangements to smuggle Socrates out of prison to the safety of exile. Socrates seems quite willing to await his imminent execution, and so Crito presents as many arguments as he can in order to persuade Socrates to escape. On a practical level, Socrates' death will reflect badly on his friends--people will think they did nothing to try to save him. Also, Socrates should not worry about the risk or the financial cost to his friends; these they are willing to pay, and they have also arranged to find Socrates a pleasant life in exile. On a more ethical level, Crito presents two more pressing arguments: first, if he stayed, he would be aiding his enemies in wronging him unjustly, and would thus be acting unjustly himself; and second, that he would be abandoning his sons and leaving them without a father.
Phaedo of Elis
Two years would have been available for Phaedo's acquaintance with Socrates, to whom he attached himself. According to Diogenes Laërtius he was ransomed by one of the friends of Socrates. The "Suda" says that he was accidentally present at a conversation with Socrates, and pleaded with him to effect his liberation. Various accounts mention Alcibiades, Crito, or Cebes, as the person who ransomed him. Cebes is stated to have become friends with Phaedo, and to have instructed him in philosophy. Phaedo was present at the death of Socrates in 399 BCE, and was young enough for Socrates to stroke his hair which was worn long in the Spartan style.