This is a problem from Beer and Johnston's Mechanics of Materials (Amazon link). There's a problem in which there are two rods of different material, area, and length. The rods are fixed to walls, horizontally facing each other, with a gap between them. The gap is spaced such that, if the rods expand for a given rise of temperature, they can't expand to full extent and instead press against each other. The solution says that at interface, the forces are equal and opposite. But another case could be a net force at interface which gets balanced by reactions at walls.
My question is why do we not to consider the latter case, and only the former case is taken?