To address the technical part of your question, people in prisons and enrolled in school are not counted in unemployment figures. Unemployment numbers come from the percentage of people actively looking for work who cannot find it, provided they are in the labor force. What constitutes the labor force is defined here:
Notice that prisoners and students are generally excluded from this category.
As to whether prisoners should be put to work as cheap labor, they actually are depending on the prison system. For example, they help clean. For various reasons, turing prisons into factories might not be the most efficient system, and a lot of people have moral objections to it. For example, a lot of incarcerated people are too mentally ill and unstable to work, even as "slaves" doing simple tasks. Training them costs money, wouldn't that money be better spent training people who aren't criminals? Shouldn't people be willing to pay more for products made domestically by normal people? Etc.
Good question though, there are no simple answers to it.