constants:
Button Red is correct
Computer A lies
Question:
"Computer A, what would Computer B tell me to push?"
Computer B would reply Red - because that is correct (constant). Since Computer A lies (constant), it would reply to you to press the green button. So you do the opposite.
--or--
constants:
Button Green is correct
Computer A tells the truth
"Computer A, what would Computer B tell me to push?"
Computer B would reply Red - because Computer B lies (constant). Computer A would tell you to push Red as well, because it is answering the question truthfully (constant). So you do the opposite.
No real need to get into logic operations involving numbers. It's just a simple problem.