Hello, thank you for taking the time to post your question!
It’s based on this underlying relationship between the variables
Markup on Selling Price = (Markup on Cost) / (1 + Markup on Cost)
Markup on Cost = (Markup on Selling Price) / (1 – Markup on Selling Price)
So what that means is that a 66.7% markup on cost would be mathematically equivalent to a 40% markup on selling price … it’s the same underlying relationship that you’re using
I hope that helps get you moving in the right direction! Feel free to reach out if you have any additional questions beyond that :)