The top image is the picture in the file Mycroft shows John at his club.
The second image is of Sherlock just after the man saves him from being hit by a bus and a frame before the man is shot dead. It's obvious that the top two are the same person.
The third is in Mrs. Hudson's flat while Sherlock is on the roof of Saint Bart's. In fact, he showed up at 221B while John was off talking to Mycroft at the Diogenes Club. We are supposed, apparently, to believe he is ready to assassinate Mrs. Hudson if Sherlock doesn't jump from the roof of Saint Bart's.
But how would he know? He'll get a call on his mobile, presumably. If so, why does he need his gun within inches of his hand in his toolbox with the lid open? Just for the convenience of the camera? Or is he protector rather than assassin?
Why is this Guy on the Stairway?
It seems as if we are supposed to think he is there to kill John. But he was one of the "assassins" Mycroft showed to John, and they were all supposed to be sent by potential customers of Moriarty's for his computer code.
They protect Sherlock while trying to find the secret code. Are we supposed to assume Moriarty hired him away from his original handler and set him up to kill John?