text: Q:
  
  Question about an Static Fluid Pressure Problem
  
  Suppose that we want to obtain liquid pressure in the below figure which is filled with water:
  
  I don't know why I get to two different answers with two different ways:
  
  Get the cube and cylinder a system, we can write the below equation in order to calculate pressure:
  $$P=\frac{Mg}{A_1}=\frac{\rho (V1+V2)g}{A_1}=\rho gh_1+\rho gh_2\frac{A_2}{A_1}$$
  Suppose we have a column of water from bottom to top and write that equation for that:
  $$P=\frac{M_c g}{A_c}=\rho g(h_1+h_2)$$
  
  Why the results are different?
  
  A:
  
  Your second formula is correct. 
  In the first one, you forgot to add the reaction force from the top wall of the cube, which acts vertically downward on water. The force on the top wall of the cube is due to water pressure (from the water column of height $h_2$), equal to $\rho gh_2 (A_1-A_2)=\rho gh_2A_1-\rho gV_2$. Therefore the total downward reaction force on the bottom of the cube is $(\rho gh_2A_1-\rho gV_2)+\rho g (V_1+V_2)=\rho gh_2A_1+\rho gV_1=\rho g(h_2+h_1)A_1$, which when divided by $A_1$ gives the pressure at the bottom of the cube.
  
  