Let the original cost price (CP) be $x$.
Selling price (SP) for Shyam (Shyam buying) $= x (\frac{p}{100} + 1)$ where $p$ is the profit percentage.
Selling price for Mohan $= x (\frac{p}{100} + 1) ( \frac{p}{100} + 1)$
Selling price for Rakesh $ = x = (1 -0.36) \times x (\frac{p}{100} + 1) ( \frac{p}{100} + 1)$
$\implies (p+100)^2 = \frac{10000}{0.64}$
$\implies p+100 = \frac{100}{0.8} =125$
$\implies p = 25\%$