Sadly, I can think of 2 scenarios:How in the world would they let him out?
1) The homeless man is found not guilty by reason of insanity. He goes into "Therapy" in a controlled environment and after a few months of parroting the "Doctors" they declare him cured and release him.
2) The prosecutor lets him plead to a lessor (non-violent) charge and he is released from prison after a few months - probably due to overcrowding and a cry to let non-violent offenders out early.
Yes, I am cynical.