The key to escaping prison in BitLife is to get the guard trapped behind some walls. The guard will prioritize moving horizontally over vertically, so if you can trap the guard behind a wall he won't be able to move closer to you. This can buy you some space so you can get out of prison and get your achievements.