Let's say I have a profit of $50$ and a margin of $50\%$.
Now I know that the revenue is $150$, despite not knowing the cost, because this is the only possibility for the $50\%$ margin i.e.
$Cost * (1 + Margin) = Revenue$
$100 * (1 + 0.5) = 150$
Now, what would the formula be to get the revenue by just knowing the $50\%$ margin and the $50$ profit?
Let ...
Your formula is $$c(1+m)=r$$ you want to express this using $p$ instead of $c$
so substitute $(r-p)$ for $c$ $$(r-p)(1+m) = r$$
now isolate $r$ $$r(1+m)-r = p(1+m) $$ obtain the result $$ r = p\bigg(\frac{1+m}m \bigg ) = p \left ( 1+\frac 1m \right )$$
in your case $m=0.5$ so $\frac 1m = 2$ and you get $$ r = 50(1+2)=150 $$