The image comes from episode 19b of the 1967 Spider-Man cartoon, "Double Identity." In the episode, a villain attempts to impersonate the titular hero.
The earliest known use of the two characters dressed as Spider-Man pointing at each other was an image macro posted February 5th, 2011 on Sharenator in a compilation of 60's Spider-Man images (shown below).
In the coming years, the image would be used with various other texts on image macros. For example, on June 26, 2012, Funnyjunk user generalshawn posted a version where the text read "SAMEFAG" in a thread (shown below, left). In early 2013, 9GAG user stormrdr posted a version to the site where the text read "HA! Look at that asshole!" (shown below, right).
The image wouldn't begin seeing widespread popularity until the mid-2010s, when people would make jokes describing situations in which two people who are very similar meet. It started growing popular on Black Twitter, particularly related to hip-hop. On May 6th, 2016, Reddit user Dualestl used the image to describe a meeting between similar-style rappers Future and Desiigner, gaining over 1,300 points.
The format began growing into a popular format on Twitter in early 2017. On March 10th, @FreddyAmazin published the photo with the caption "When your boo start talking like you," gaining over 3,400 retweets and 8,900 likes (shown below, left). On May 17th, a joke was uploaded to /r/funny, where it gained over 440 points (shown below, right). The post was also upped to /r/MemeEconomy on July 9th, where it gained over 4,900 points.
Spider-Man: No Way Home Cast Recreation
On February 23rd, 2022, Tobey Maguire, Andrew Garfield, and Tom Holland, three actors who played Spider-Man in different runs of the film franchise and reunited in Spider-Man: No Way Home, recreated the meme. The post was shared by the film's Twitter account (shown below), generating excited responses from film fans.