Where did Jesus first meet Simon Peter and Andrew?
There is no contradiction here at all. The chronology of events becomes evident when viewing the grid below. In John 1:35ff, John the Baptist was with his disciples. He tells them that Jesus is the “Lamb of God” (v. 36) and they stay with Jesus a while (v. 37). In John 1:40-42, Andrew goes and gets Simon-Peter and they follow Jesus. Why? Because Andrew had spent time with Jesus and told Simon that Jesus was the Messiah (v. 41). Later, in Matt. 4:18, Jesus was walking by the Sea of Galilee and He sees Simon-Peter and Andrew as they were fishing. He had not asked them to follow Him until this point in verse 4:19. They do (4:20). There is no contradiction.