Complex sentence: Benjamin walks in on them, initially trying to flirt with Angela, but when he notices Horace's presence he leaves.
Split into simpler sentences: Benjamin walks in on them, initially trying to flirt with Angela. However, when he notices Horace's presence, he leaves.