Well if not for the 3 words, I'd ask the right robot "what would the other robot tell me his name is?" Then you give it to who ever is claimed to be Tom. I guess the shortest I could go is 4 words. While pointing at the left robot, ask the right robot "He claims to be?"
4 cases:
1. Left lies, Right tells truth, left is John
2. Lift lies, right tells truth, right is John
3. Right lies, left tells truth, left is John
4. Right lies, left tells truth, right is John
In case 1, Left should get the package. Right tells truth, so he would reply "Tom" because the right one lies and would say his name is Tom. You give the package to "Tom" who is really John.
In case 2, right should get the package, Right tells truth, so he would reply "John" because the left lies, so left would call himself "john" when he is really Tom. So you give the package to the guy on the right as he is by default "Tom" again, he's really John.
In case 3, left should get the package. Right lies, so he would reply "tom" because the left robot is John and would tell you he is John but the right robot would lie and say Tom, so give it to the left robot "Tom" who is really John.
In case 4, right should get the package. The left robot would lie and claim to be John since he is actually Tom. The right robot would tell the truth and say the left robot would claim to be John. Give the package to the right Robot since he by default would be "Tom"... but really John.
Someone would have to figure out how to get that down to 3 words.
[spoiler]Well if not for the 3 words, I'd ask the right robot "what would the other robot tell me his name is?" Then you give it to who ever is claimed to be Tom. I guess the shortest I could go is 4 words. While pointing at the left robot, ask the right robot "He claims to be?"
4 cases:
1. Left lies, Right tells truth, left is John
2. Lift lies, right tells truth, right is John
3. Right lies, left tells truth, left is John
4. Right lies, left tells truth, right is John
In case 1, Left should get the package. Right tells truth, so he would reply "Tom" because the right one lies and would say his name is Tom. You give the package to "Tom" who is really John.
In case 2, right should get the package, Right tells truth, so he would reply "John" because the left lies, so left would call himself "john" when he is really Tom. So you give the package to the guy on the right as he is by default "Tom" again, he's really John.
In case 3, left should get the package. Right lies, so he would reply "tom" because the left robot is John and would tell you he is John but the right robot would lie and say Tom, so give it to the left robot "Tom" who is really John.
In case 4, right should get the package. The left robot would lie and claim to be John since he is actually Tom. The right robot would tell the truth and say the left robot would claim to be John. Give the package to the right Robot since he by default would be "Tom"... but really John.[/spoiler]
Someone would have to figure out how to get that down to 3 words.