In no way I read this does it make sense. The unjust ruler wishes to execute a person, but with some semblance of legality. So he wishes to have a written statement condemning the accused. He threatens death, to a person if they do not provide written testimony condemning the accused. Under what semblance of legality would he put to death the person that refuses to condemn the innocent?
The unjust ruler would have to create a law, to be seen for it to be a legal execution, of those that did not supply affidavits at his command.
No matter which way you look at it, the ruler is not doing anything under any semblance of legality.
It is a dictator telling his people to do or die.
Of course the overall question only changes slightly, would you lay your life down for the innocent?
TAJ is making up moral thought experiments. These sort of things usually do NOT occur in real life. They might occasionally. In truth, such things can only occur in very oppressive environments or regimes, where totalitarian leaders carry out any nutty order at their whim.
It is like those "what if there were three men on a boat, it was leaking, and they could make it to shore only if there were only TWO men . . . . so, how to decide WHO should be thrown overboard"?
This thought experiment thing is used quite a bit as a tool to "envision" various possibilities and realities. Einstein did it with science. As I recall, Kant did it at times with philosophy. Granted, often the scenarios are not any that we would or could ever actually experience in real life. But, the imaginative fictional analogies and metaphors help to make certain points.