Let be the cost of making the system. So,
the wholesaler bought it for % ,
the retailer bought it for ,
and you bought it for .
Now, substitute everything into the last equation. , and then you will have an equation that is only in terms of , which is what you wish to find. So, just solve for .