What also happens if Pilot A inadvertantly has the wrong pressure setting on his altimeter ? Am I right in thinking that TCAS assumes all height readouts are based on 1013mb ? What happens below the transition altitude ?
It's irrelevant. All transmitted heights are SPS regardless of actual altimeter setting. TCAS is therefore correctly determining the difference between relative altitudes even though these values are otherwise meaningless below TA.