Thought experiment to derive the equivalence principle between mass and energy E = mc²