This is a pretty basic question. So in the below figure is the representation of prismatic column. The forces are represented as P1 and P2. let x be an arbitrary cross section between A and B. The stress in the arbitrary (not considering self weight) is given as P1/A Where 'A' is the area of cross section of the arbitrary cross section between A,B. Similarly for an arbitrary cross section between B and C stress is given as (P1+P2)/A.
Now my question is the P2 will also induce some force on the cross section in AB region. So the stress should have been (P1+P2)/A for the cross section of X also. (Imagine this cross section as a trampoline. where a metal ball pushes it down from above and another metal ball is tied below, also pulls it down). So the net stress induced should be same (P1+P2)/A and also the net strain should be uniform in AB and BC cross section?