Both Mark and Luke tell of Jesus giving a sermon in a synagogue when he was in Nazareth. However, in Mark the story of the sermon is less lengthy and detailed than the story found in Luke. Also, the placement of the story is different in both Gospels. In Mark the story of Jesus’ sermon is well into the Gospel and it is not Jesus’ first public act. In fact the Sermon comes after Jesus has already performed many public miracles and is a well-established figure. Jesus had already preformed an exorcism, healed a man with a withered hand (3:1-5) and healed a woman suffering from hemorrhaging (5:25-35). In Luke, the Gospel states that their had been a story sent out about Jesus that apparently was spreading around Galilee where he began teaching in the synagogue after his baptism and 40 days and nights of temptation, becoming popular with the people there. However Luke does not explicitly state that he preformed any great deeds there, only that his reputation grew (4:14-15). The first detailed account in Luke of Jesus conducting any great deed in public was in the latter half of chapter 4 when he was giving his sermon in the Synagogue on the Sabbath at his hometown of Nazareth. He reads from the prophet Isaiah, essentially paraphrasing him and declaring himself (Jesus) a prophet of God sent to help people. Once the crowd hears this, in the aftermath of him reading the sermon (4:24-30), they begin to implore Jesus to conduct miracles to assist them. Jesus states “Truly I tell you, no prophet is accepted in the prophets; hometown.” (Luke, 4:24) He also evokes the image of two great prophets, Elijah and Elisha, saying they had not healed everyone they had encountered. Jesus was trying to get the crowd to understand that he was not simply some miracle healer but came to deliver a message to people and that the people who believed in him should be humble. Despite this message, the crowd nearly runs Jesus off a cliff on the outskirts of town, however he is able to pass through them in the end and head onwards to Capernaum. In the end it is likely Luke chose to use this story as the beginning of Jesus’ deeds because in this sermon he essentially says publicly for the first time (in the Gospel according to Luke) that he is of divine status and has been sent to the earth by the Lord to help and save.
They do not contradict each other they are giving their own accounts as all witnesses do. In Matthew, it talks about Jesus, going into the synagogues, all over Galilee, and preached to all who would listen. Galilee was a Gentile city, but both Jews, Gentiles and others resided there. Gentiles were following him as well.