You need to consider one of the two formulas such that:

`P = rho*g*h`

You should remember that density is given by mass divided by volume such that:

`rho = m/V`

Hence, you should substitute density by the fraction `m/V` such that:

`P = (m/V)*g*h`

Moving to the second factor, you need to question yourself how to write the gravity using force and mass such that:

`g = F/m`

Substituting `F/m` for g in pressure formula yields:

`P = (m/V)*(F/m)*h`

You should write the volume in terms of area and height such that:

`V = A*h`

Substituting A*h for V in pressure formula yields:

`P = (m/(A*h))*(F/m)*h`

Reducing m and h yields:

`P = F/A`

**Hence, you may convert the pressure formula from `P = rho*g*h` to `P = F/A` , using the formulas for density, volume and gravity. **