Place it at the exact moment of recognition in a scene, then follow it with a shocked reaction sound to hold that beat before the scene moves on. For a longer gag, lead in with a running-away cue and close with a laughing refusal, keeping the sequence short so the joke stays on the encounter itself.