This question already has an answer here:
There are two boxes in front of you. One box has an octopus inside it and the other box does not. Box A has owner A standing in front of it and Box B has owner B standing in front of it. One of the owners ALWAYS tells the truth and the other owner ALWAYS lies. Both owner A and owner B know which Box has the octopus inside it. Both owner A and owner B know whether or not the other is a truth-teller or a liar. What should you ask owner A in order to find out which box has the octopus behind it?