Thank you to all who had a go at solving the riddle. Please find the solution below.
“If I asked what door would lead to freedom, what door would the other guard point to?
If you asked the truth-guard, the truth-guard would tell you that the liar-guard would point to the door that leads to prison.
If you asked the liar-guard, the liar-guard would tell you that the truth-guard would point to the door that leads to prison.
Therefore, no matter who you ask, the guards tell you which door leads to prison, and therefore you can pick the other door.”