The point the Apostle Peter is making is for the believers to remember the words spoken beforehand by the holy prophets and the Lord and Savior (vs2) that in the last days (vs3) mockers will come with their mocking following after their own lust.
Vs4, Where is the promise of His coming? For ever since the fathers fell asleep, all continues just as it was from the beginning of creation. Peter then reminds them of the flood (vs6), and the change it made in the earth. Since God already intervened once, He will intervene again.
So what about John 1:1-3? "The Word" is a title for Jesus Christ, the One who reveals the mind of God to men. He/that One existed from "the beginning," all the way back into eternity before time and space. This is why John 1:3 identifies the Son of God as the creator and apart from Him/the Son, nothing came into being that has come into being."
Referring to 1 John 1:1-3 the topic is "The Word of life." And John explains, "what we have seen with our eyes, what we beheld and our hands handled, concerning the "Word of Life."
John is asserting that his ministry of witness was based on the historical event of Christ's appearance as a man. It is without a doubt that Jesus displayed the kind of endless glorious life which God himself possesses. After all, He exists "with the Father, and this intimate relationship was then made known to mankind through the witnesses such as John the Apostle.
So, to answer your question the Apostle Peter's reference to the beginning was to show there were always "mockers" even back in Genesis.
The Apostle John's beginning deals with who was there in the beginning even before the Genesis beginning with God. Then at the appointed time the Son incarnated as a man, who for us a Savior, Christ the Lord. (Luke 2:11).