How is foreshadowing employed by Chekhov in "The Lady With the Dog?"
In the opening couple of pages of the story two things are made clear. One is that Dmitri has a very poor relationship with his wife. "...he secretly considered her unintelligent, narrow, inelegant, was afraid of her, and did not like to be at home. He had been unfaithful to her long ago--had been unfaithful to her often . . . " His wife likewise has a low opinion of him, and treats him with veiled contempt.
The other thing that is made clear is that Dmitri is a womanizer. Although he refers to women as "the lower race," ". . . he could not get on for two days together without 'the lower race' . . . . In his appearance, in his character, in his whole nature, there was something attractive and elusive which allured women and disposed them in his favour; he knew that, and some force seemed to draw him, too, to them." He is attracted to women, and women are attracted to him.
All of this exposition is obviously preparing the reader for a story in which Dmitri will get involved in yet another affair with a woman. Chekhov opens his story with Dmitri on vacation at Yalta, away from his wife, and with his acquaintances talking about a new arrival who has appeared on the sea-front promenade, a lady with a little dog. The reader will naturally expect the bored, sophisticated, womanizing Dmitri to strike up an acquaintance with this unaccompanied woman. The little dog provides him with a convenient excuse.
What Dmitri and the reader are not prepared for is that the relationship will develop into such a powerful attachment that it becomes the biggest problem either Dmitri or Anna Sergeyevna--both married with children--has ever experienced. And Chekhov, characteristically, leaves the problem unsolved.