Would you choose to spend 5 years in prison or 9 years but be free every even year?

The second option (9 years) assumes that you cannot escape during the free years - every time you have to go back to prison. So, the first option is PPPPP and the second is P-P-P-P-P (- is a free year). In both cases you spend 5 years in prison.