It makes much more monetary sense to consider selling the franchise back to Marvel at a time when they'd have to re-contract for any future films in the franchise anyway.
I think the contract runs out when they stop making Spidey movies, so essentially Disney/Marvel would have to buy them back outright (at WAY more than the $7 million they sold them for when they emerged from bankrupcy in the 90s) to get the full rights back or use Spidey (they do have a split on the merch., so its not impossible). Otherwise, as long as Sony releases a Spider-Man flick every few years, they keep the rights.
I honestly don't know the precise terms under which Marvel sold the rights to Sony, or under what conditions they could buy them back. I was speaking about all the contracts involved in actually making the films. With the actors, and producers, and writers, and directors. Usually, you contract them for 3 films in a franchise when you make the first film. That way, if you decide to do sequels, you don't have to renegotiate with all of those people in order to get them back. The plus is that you don't renegotiate, but the negative is that you've basically pre-negotiated ahead of time. An actor is going to demand more money per film if he knows he's contractually obligated to do 3 since he can't renegotiate later (well, without penalties, you can technically *always* renegotiate). Ditto for pretty much everyone involved.
Point being that having the set of people you need to make the film already contracted to do one more, you're wasting that potential revenue if you *don't* do one. Even if it's total garbage, you do it (and this is why we get so many really really terrible 3rd films in a franchise). So regardless of whatever other conditions apply, or whether they want to sell back to Marvel, Sony would always make a third film *first*. So the fact that they're making a third film doesn't tell us anything about whether they are going to sell the rights back to Marvel. After they make the film, and that set of three film contracts have expired is the time to make that decision. Because if they make more Spidey films, they have to go out and hire all new people to do them, with new contracts. And that's time/money/effort.