Answer: The energy equation is
, if you want the solution for mass, then you want the mass alone in one side of the equation. You can do this in the next way:

where i divided by c square in both sides of the equation.
Then if you know the mass energy of an body (and the velocity of the light), with the equation
you can obtain the mass of such body.