Equity: Price at which margin call is received

Hello everyone,
In the EOCs of Market organization and structure, the 23 question, asks to compute the price at which the trader will receive a margin call.
The data is the following: stock price = 25, the initial margin = 50%, and the maintanence margin = 30%

I used this formula: Price at which I recieve the MC = P0*(1-initial margin) / (1-maintanence margin)

But it doesnt work out, and the book uses this equation:

Equity per share / Price per share: 12.5 + P -25 / P = 30%

The 2 formulas should get the same result but they do not do, does anyone know why?
Thanks in advance!

Both are correct.

$ 25 × (1-0.5)/(1-0.3) = 17.86

haha yesss, the problem was that when I saw the maintanence margin of 0.30, i automatically thought that 1 - 0.30 was .60 and not .70, so I computed it with .60…

dumbest error