The scenario would play out thusly:
Peter Parker and Bruce Wayne bump into each other in Akron, Ohio. "Why, Akron?" you ask? National Inventors Hall of Fame, naturally. As two highly inventive superheroes, it's a natural draw for these two characters who often create gadgets of their own. Peter would be visiting of his own accord while Bruce has been invited to give a speech commemorating a new wing of the building/an exhibit on some outlandish, plot-important display of possibly villainous technology.
A line in Bruce's speech about the loss of his parents at a young age, particularly his father, and how it drove him to become the man he is today, strikes an emotional resonance with Peter. Managing to run into Bruce checking out an exhibit alone, Peter expresses his admiration for the speech and shares his own tragic history along with some of his inventions. The two bond and seem to start a small friendship. They even go to brunch!
BUT THEN!
Oh noes! The Mad Hatter has teamed up with the abominable Hypno Huster, truly one of Spider-Man's greatest foes from the past, to steal the inventions on display. Because it enhances their hypnotic abilities, why not.
As the crowd flees/becomes hypnotized, Bruce and Peter slip away and into costume. Their attempts to fight the menace goes as expected. They get in each other's way, Batman grunts about Spider-Man's lack of professionalism, Spider-Man keeps callin' Batman "Batty" and cracking jokes about capes and what his "bat-powers" are "Can't you find those guys with your sonar?" etc.
The duo manages to subdue the crowd/save the inventions, but the bad guys get away. Spider-Man mentions a possible teamup to capture them, but Batman goes it alone. Of course, he can't get rid of Spider-Man who trails him by using a spidertracer which he uses to follow Batman to the seedy part of Akron.
Batman being Batman, he's aware of the tracer all along and tries to ambush Spider-Man to slow him down. Spidey's spidersense saves him at first, but Bruce becomes wise to his foes seemingly precognitive abilities. Using his vast strategic knowledge and superior fighting skills, Batman brings the skirmish to a standstill. The two glower at eachother a bit, Webhead slings a few quips, when suddenly an off-hand comment made by one of them clues each of them in to who the other actually is.
The two heroes, being the most melodramatic inner-monologuers of their respective comic universes, have a slightly sad heart-to-heart as they each express, for several lifeless panels, why they do what they do.
Now truly teaming up, the two proceed to take down Mad Hatter and Hypno Hustler. Which takes all of five minutes because it's Mad Hatter and Hypno Hustler.
And so we come to the conclusion of Spider-Man/Batman: Frenemies.