The Russians captured Azov and Taganrog in a war with Turkey that ended in 1700. Then they decimated the Swedish army at Poltava in 1709, thereby crippling their main enemy, and freeing the bulk of their forces for action against any enemy, including Turkey.
The Russians were "on a roll" by 1710. How and why would they lose Azov and Taganrog to Turkey so soon after winning such victories? Or did these victories make them overconfident?
Conversely, if the Turks won, it didn't seem to have done Sweden or its King, Charles XII, any good (given the ending of that war), even though they were allies of Turkey. Why is that?
Peter greatly underestimated the size and speed of the Ottoman army, overestimated his chances to peel away Ottoman vassals as allies, allowed his supply lines to be disrupted, and misread the terrain and Ottoman maneuvers, bogging his forces down in a marsh.
This should have been the end of Peter the Great, but his reputation and the timidity of the Ottoman general Pasha Baltadji meant he escaped with a negotiated peace instead of capture and the complete destruction of his army.
My cousin-in-law, Professor Viktor Ostapchuk of the University of Toronto might be willing to help you with this. The following is what I know about this sad time in Ukrainian history: Tsar Peter's marketers had just come up with the concept of "Rossiya" to justify Moscow being the capital of ancient Christian Kyiv-Rus'. Moscow was supposedly the "Third Rome" & a treasured ikon stolen from a monastery just north of Kyiv was renamed the "Vladimir Ikon" & kept in Moscow for use in religious justification of its rule. The murder of tens of thousands of Rus'- Ukrainians at Poltava, Bili Tserkva (White Church), and other conquered lands drove most Slavs away from fighting on the Muscovite side. The descendants of the Kozaks, to this day, identity as Rusyns, not Russians. Since that time, free Rus' Ukrainians will form alliances with Moslems and others fighting Moscow imperialism. So this battle continues in the 21st century. The battle over whether Moscow is worthy of being a capital of Orthodox Christianity continues as well. Tsar Putin seeks to conquer Kyiv, without which there is no empire of "Russia", & also continues the propaganda war against the Patriarch of Constantinople. Telling that Putins spiritual advisor is on the Holy Mountain, not in "Russia," and that Putin is never seen receiving Holy Communion in an Orthodox Church. Since Putin started visiting the Holy Mountain, many monks began rebelling against the Ecumenical Patriarch, more evidence that the wars of 1709-1711 never ended.