We need to analyze the units of each of the magnitudes and solve the operations between them:
![\begin{gathered} m\to kg \\ g\to(m)/(s^2) \\ h\to m \\ m\cdot g\cdot h\to kg\cdot(m)/(s^2)\cdot m=kg\cdot(m^2)/(s^2) \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/high-school/nv7fzjc2y8hypy9bhaxu2vtzbus168qyj0.png)
A possible unit for potential energy is kg*m^2/s^2.
Also we can use distributive property to replace some of the units by derived units, for example, Newtons:
![undefined]()