Consider the free body diagrams (FBD) below.
As seen in the FBD's, the only force responsible for accelerating the trailing mass in both situations is the tension force in the string.
Given that the trailing mass in situation 1 is greater than the trailing mass in situation 2, in order for both to have the same acceleration the tension force in situation 1 must be greater than the tension force in situation 2, or
$$T_{A}\gt T_B$$
An intuitive example would be a car towing a truck (situation 1) versus a truck towing a car (situation 2). A stronger rope would be needed to tow the truck.
Hope this helps.