The answer is in the sentence. One of the men is innocent so why should his freedom be based on someone else's negligence? No matter the crime, there are always going to be "bad" people in the world. It comes down to which option is the better of two evils. The truth comes out eventually anyway.
If government was allowed to convict innocent people for whatever reason, this could be potentially bad for the country as a whole if government were to gain that power. I believe in "Innocent until proven guilty." It should be everybody's responsibility to protect themselves from people who commit crimes whatever that crime may be.
It's worse of an innocent man is convicted of a crime that he did not commit and is forced to rot in prison for the rest of his life or is executed than if a guilty man is let free. Both are terrible but still it's much much worse to punish someone for a crime get didn't do.
This is a very interesting question; hypothetical as it may be, since in real life, if we were to know who is guilty and innocent, why would we have to engage in this false dilemma? I too agree that we should release both of them. In my personal opinion, the price of getting an innocent man to pay for something he didn't do is far too much. Yes, we cannot foretell whether releasing the convict could possibly lead to much more disastrous consequences - for e.g. he could kill thousands of people with a bomb after the release. But in my opinion, such a cost shouldn't be that of the innocent man to bear. Strict consequentialists may disagree and say that by the principle of utilitarianism, we should convict both of them. But the indeterminate nature of what could happen after the release doesn't provide a strong enough justification for their argument, I think.