When the engineer sees her innocently comforting his friend, he mistakenly believes she is betraying him.
When the engineer misinterprets her as a betrayer, seeing her comforting his friend innocently.