I think someone has been watching too many movies, but the most likely explanation is that his twin brother was in on the plot. Here are more details from the Washington Post:
Alexander Jheferson Delgado of Peru was serving a 16-year sentence for child sexual abuse and robbery when his brother, Giancarlo Stuard Delgado, visited him on Jan. 10, 2017, the Peru Ministry of Interior said in a news release.
Alexander met his twin in a common area, and later brought him to his cell, where he offered his sibling a sedative-laced soda, The Washington Postreported.
Alexander then traded clothing and swapped places with his passed out sibling in a brazen escape, authorities said.
His brother woke up hours later and told guards what happened and police confirmed his identity using his fingerprints. Officials believed that his brother helped him escape and detained him initially before releasing him.
Alexander Delgado was captured later and told police that he did it because he wanted to see his mother. Giancarlo was asked if he forgives his brother and stated.
“I need to speak with him about that.”