Complex sentence: Hastings tries to give Smith a telegram, but Macreedy snatches it away and discovers that it is his own unsent message.
Split into simpler sentences: Hastings tries to give Smith a telegram, but Macreedy snatches it away. It is his own unsent message.