Original equation:
3M = M + N/P + X
Multiply each term on both sides of equation by P to clear fraction on right side:
3MP = MP + N + XP
Get rid of MP on right side by subtracting it from both sides of equation:
2MP = N + XP
Get rid of N on right side by subtracting it from both sides of equation:
2MP - N = XP
Get rid of P after X by dividing each term on both sides of equation by P:
2M - N/P = X
We now have our value for X:
X = 2M - N/P