I am still sceptical about this. I won't dismiss it as impossible (I haven't read the book you described nor found it) as it isn't impossible, but unlikely.
However...
This has quite some effects in the long term. For example, the first real marriage between an Ottoman Princess and a Christian Monarch that is documented, with the princess even converting.
Militarily speaking the Ottomans cannot do much to reverse Russian Conquest of the Baltics. The Ottomans can however distract the Russians when the Swedes are also at war. For the Ottomans, winning battles against Russia, getting war bounty from the Russian enemy, keeping them away from the Black Sea region and the Caucasus is a success.
But the goal of keeping Russia away from the Black Sea does not require any war: Russia is bottled in a Sea of Azov with the Ottomans controlling Kerch. Pruth Treaty rolled back even that: Azov is returned, Taganrog destroyed, Azov fleet either destroyed or sold to the Ottomans.
War bounty? From where? The Tatars can raid Ukraine but this would not be
Ottoman’s bounty. The Ottomans hardly could realistically get far beyond the “no man zone” separating them from Russia.
The Ottoman territories on Caucasus are not under the Russian attack, yet (BTW, it seems that the locals were not uniformly aware of the fact that they are the Ottoman subjects until the Ottomans ceded North Caucasus area to Russia 🤗).
Winning battles? Sounds nice but even Pruth campaign is not encouraging: the Ottoman losses are high, the Janissary attacks failed (*), Brailov capitulated and this is while they were fighting on their own (vassal) territory. Invasion is much more difficult logistically and the Swedish example is anything but encouraging.
So post-Pruth war gives nothing to the Ottomans except for the losses and expenses and it is worth noticing that the treaty was lacking any Sweden-related items except for Charles’ safe passage (it seems that by this time he already overstayed his welcome) even if Peter was ready to make serious concessions on the Baltic coast (you can compare the conditions in Shafirov’s instructions with the Treaty). Neither did the Ottoman Empire show any enthusiasm of joining Charles when he stayed in Ukraine before Poltava. Ditto for going into the war after Charles arrived. Only when Peter launched his absolutely unprovoked (and quite foolish) invasion, the Ottoman Empire reacted.
Of course, we can assume that the Sultan is going to fundamentally change his policies just because he got a bellicose sin-in-law but it does not look convincing.
(*) Running with the swords against chevaux de frise was definitely a show of bravery but it did not work.
The military can be paid and a paid soldier is a happy soldier.
Paid out of what? If the war continues, the only source of money is loot and there is not too much of it to be obtained in Southern Ukraine. Besieging border fortresses in the Southern Russia is a tedious task with not too much loot either. The Tatars may benefit from the raids but how the slaves captured by them are going to end as the money in janissary pockets?
The best the Ottomans can actually do is trying to halt increasing Russian influence in Poland-Lithuania, which is more important than trying to conquer Ukraine or even raiding it.
And for
this the war is counterproductive: increased Russian influence in the PLC almost automatically produces pro-Ottoman sympathies (as was proven during the reign of CII). But at that time a
meaningful Russian influence in the PLC is a matter of unpredictable future.
Sweden and the Ottoman Empire remain more in touch as allies, this is even likelier if Ahmed II's son Ibrahim lives beyond 1714 and becoming the next Sultan instead of Mahmud I. Russia tried to avoid several wars with the Ottomans OTL. In this scenario, the Russians will realize they risk a war with both the Swedes and Ottomans at the same time, which will discourage them even more.
Not sure which period you are talking about but definitely not immediate post-Pruth/post-GNW. The obvious problem with the plan you described is readiness for war. Sweden suffered terrible losses in GNW so a new war with Russia was not possible in a near future. It took a couple decades before Sweden risked a new war with Russia (Hat’s War) and it was beaten. The Ottomans already had been beaten in 1730’s and kept being beaten in the following wars.A simultaneous Swedish-Ottoman war with Russia eventually happened in the late XVIII and it ended up with the Ottoman defeat and confirmation of status quo on the Baltic.
What I do wonder is what the result would be if Peter the Great was captured in the Pruth Campaign or died, with this marriage happening. I wonder if Charles XII would try for the reconquest of the Baltics (without St. Petersburg) while the reforms of Peter the Great are reversed. This is something worth for a TL...
Most probably died. The decision was, in the case peace terms are rejected, “to break through not giving a mercy and not asking for it”. Based upon the later Russian-Ottoman experience, if implemented this decision may easily result in the Russian victory: see the Battle of Stavuchany as closest example.
As for the rest, Charles is going to do his reconquest with what? He lost his army and Sweden is hard pressed to bring the new troops. Saxony and the PLC are back (for whatever they worth) and so is Denmark. Even at its best times Swedish army is not well-equipped for taking the fortified cities and all Baltic fortresses are in the Russian hands while countryside is devastated both by the Russians and Swedes (look at Levenhaupt’s difficulties to gather supplies).
Then, a popular but rather unfounded misconception is that with Peter’s death the reforms are reversed. AFAIK, the main and only base for this theory are confessions of Tsarevich Alexey
extracted under the torture with a stated goal to show that he was plotting to do this. While Alexey was not sharing all ideas and preferences of his father, he was, if anything, more truly “Westerner” by education and culture than his father.
But the marriage has some consequences: "If the Swedish King can marry an Ottoman Princess, maybe we can too". In the 18th century, despite being trashed in the Great Turkish War the Ottoman Empire was still a respectable State and potentially a valuable ally, until the Russo-Turkish War of 1768-74. After Sweden, a few German, Italian and Polish-Lithuanian Rulers may try to go for a marriage alliance too. Mostly for the sake of alliances against Austria or Russia.
Value of the marriage-based alliances is overstated. Marriage may serve as a formal link when there are tangible mutual interests.
Of course, matrimonial link to one of the European Great Powers could be attractive for the lesser players but what would be in that schema for the Ottomans? Just as with CXII: OK, he is marrying Sultan’s daughter and the Sultan is marching to war for no obvious reason just because his son in law already lost
his army and wants more soldiers and money to keep playing his games from which the Ottoman Empire is not going to benefit? The “PLC rulers”? really, who cares when they can’t control their own country. German and Italian? What’s the purpose?