Part 2.

The presumption is that Mr wrote first, and then Mt and Lk wrote with a copy of Mr and also a copy of Q in front of them. Both Mt and Lk respected Mark's outline of the story, but choose different way to incorporate the material from Q into their gospels. Mt "invented" the literary conceit of a Sermon on the Mount as a device to place a large chunk of the Q sayings into the mouth of Jesus; and Luke "invented" his literary conceit of a very long dialogue between Jesus and his disciples as they walked to Jerusalem.

Therefore, conclude most scholars, there never was an historical Sermon on the Mount in which Jesus said the things collected in Q, and nor was there ever an historical Sermon on the Plain in which Jesus repeated most of the same things he said on the Sermon on the Mount in a different order en route to Jerusalem. 

Thus, the two sermons are not historical, they did not occur as described; but they are none the less truthful collections of the sayings of Jesus.