dont know why i cant get this ... but I cant seem to solve the following for P4:

M = (( X1 * P1 + X2 * P2 + X3 * P3 + X4 * P4 ) * R ) / ( P1 + P2 + P3 + P4 )

can anyone help me please?