Zachary Johnson escaped from the John Latoracca Correctional Facility in Merced County Tuesday. Deputies believe he got out through a hole he made in the ceiling above a shower.
Investigators say his girlfriend, Jeanette Segovia, had a cab waiting on Highway 59 to drive him to see her in Los Banos.
They say his wife, Dawn Hathaway, then wired money to a Western Union in Santa Nella, so he could go see her in San Jose.
"Zachary Johnson is not very good at geometry," said Merced County Sheriff Mark Pazin. "For he's back in custody after his love triangle with wife and girlfriend collapsed."
Authorities caught up with Johnson in Santa Nella, where they say he forced a cab driver out of the vehicle and sped away.
That led to a long pursuit, which finally ended when deputies used spike strips to stop him near Gilroy.
Johnson and both women are now booked into jail in Merced County.