For example, if I were to pray that the businessman in front of me win the lottery, but technically he's not a businessman, he's just a person wearing a suit.
Would this prayer not work?
Mi Yodeya is a question and answer site for those who base their lives on Jewish law and tradition and anyone interested in learning more. It only takes a minute to sign up.Sign up to join this community
Rashi says this on Bamidbar 21:1 (English translation here):
יושב הנגב. זה עמלק (שם) שנאמר (במדבר יג, כט) עמלק יושב בארץ הנגב ושנה את לשונו לדבר בלשון כנען כדי שיהיו ישראל מתפללים להקב"ה לתת כנענים בידם והם אינן כנענים ראו ישראל לבושיהם כלבושי עמלקים ולשונם לשון כנען אמרו נתפלל סתם שנאמר אם נתון תתן את העם הזה בידי (מדרש אגדה):
Basically, after Aharon died, a group of Amaleikim attacked the Jews. They spoke like Canaanites, hoping the Jews would pray that Hashem deliver the Canaanites into their hands; since they were Amaleikim, the prayer would fail. However, they didn’t disguise their clothing. Unsure of who this people actually was, the Jews prayed that Hashem deliver “this nation” - whoever it may be - into their hands, and they were successful.
The clear implication from Rashi is that had the Amaleikim successfully tricked the Jews into praying to be saved from the Canaanites, their prayer would indeed have failed, as they prayed for the wrong thing.