Is pressure exerted by different forces on a fluid particle same? If the  closed container containing the fluid (not any air) is moving with some acceleration, can pressure due to a fluid particle's weight be equal to pressure due to a force exerted by another fluid particles so that so that the fluid particle moves with the same acceleration?


Here Pressure due to gravity is equal to pressure due to forces exerted by fluids in horizontal direction.Why?
 A: In the vertical direction, ff the particle is more dense than the fluid, it will tend to sink to the bottom of the container, and if it is less dense, it will tend to rise to the top of the container.  This just relates to the buoyancy effect of the particle's weight in combination with the hydrostatic pressure distribution within the fluid caused by gravity.
Now for the horizontal acceleration.  If the fluid and container are accelerating horizontally in the positive x direction, that is equivalent to imposing artificial gravity in the negative x direction.  If the particle is more dense than the liquid, the particle will move toward the back of the container (relative to the fluid), and if the particle is less dense than the liquid, it will move toward the front of the container (relative to the fluid).  In either case, if there is sufficient time for it to reach terminal velocity (relative to the fluid) before it hits the front or back of the container, it attain the same acceleration as the fluid itself relative to a laboratory frame of reference.  Before that, it's acceleration will be either higher or lower than the fluid acceleration, depending on its relative density.
A: Updating the answer according to the updated question.
The pressure in a liquid changes in response to applied forces. 
As an example, we can take a vertical cylinder with a liquid compressed by a heavy piston on the top. The heavier the piston, the greater the pressure of the liquid, since this pressure has to balance the weight of the piston - otherwise, the piston would keep falling.
We could replace the piston with a column of liquid of an appropriate height and get the same result.
We could replace the heavy piston by a light piston and apply some down force to it. If the applied force is equal to the weight of the heavy piston, the pressure of the liquid would be the same as it was under the heavy piston. 
We could put such cylinder in the horizontal position and the pressure of the liquid would still be similarly affected by a force applied to the piston.
The bottom line here is that there is more than one way to raise the pressure in a liquid.
Moving to the problem at hand, before the container starts accelerating, the pressure at points A and B is the same and corresponds to the column of liquid above them, $\rho gh$.  
When the container accelerates horizontally to the right, the left wall of the container exerts an additional force on the liquid near the wall, which increases its pressure. This pressure propagates in all directions, resulting in a reshaping of the liquid to adjust to the new balance of forces. 
Since the liquid is accelerating now, the pressure at point A has to be greater than the pressure at point B - otherwise, there won't be any net horizontal force required to accelerate the parcel of liquid between them. 
Since the pressure, at any given point, acts in all directions, including vertically up, the upward pressure from point A will be greater than the upward pressure from point B. Then, to keep things in balance, the downward pressure of the column of liquid on point A has to be greater than the downward pressure of the column of liquid on point B, which necessitates the inclination of the surface of the liquid, as detailed by the calculations in the textbook.  
