Generally when there's a coup, those complicit either go to prison or are executed.
After this "failed coup", Prigozhin can go back to Africa with the men loyal to him. He avoids having to be in the front lines during the Ukrainian counter offensive and does so while appearing strong. I suspect Prigozhin has a better sense of how the Ukrainian counter offensive will go than you do. He avoids a possible collapse of the Russian Federation. When things go badly for Russia, he can say he warned everyone, and did what he could to prevent it. When the Putin regime collapses he will be well regarded in Russia.
And that's just the parts of the deal that are publicly known.
Meanwhile what did Putin get? One day he addressed the nation and declared Prigozhin a criminal and terrorist. Then the next day Prigozhin marches on Moscow. Then suddenly all is forgiven, Prigozhin and Wagner are not criminals and terrorists. Kinda a bad look isn't it? Just letting criminals and terrorists off the hook like that?
Seems the only thing Putin got was he didn't get removed from power. And even that's not certain... has Putin been seen publicly since his address where he declared Prigozhin a back-stabbing criminal? I guess we'll have to wait and see...