In the Season 9 - Episode 3 "Andy’s Ancestry" Jim pulls an epic prank on Dwight where his Asian actor friend Steve comes to the office and tricks Dwight into thinking he is Jim. Not surprisingly, Dwight is somewhat convinced too. 

> Dwight: You don't work here! You're not Jim!  
> Pam: Jim, I got us that dinner reservation. Grico’s at 7:30.  
Fake Jim: Oh great, can't wait.
> [Kisses Pam]

Kisses Pam? really? Did he really kiss his friend's wife JUST to prove to Dwight that he really is Jim? Did Pam really went with the kiss without feeling awkward and Bizzare? I mean he is a friend.. NOT her husband.

How and why Did they kiss even as a prank?