Assuming that your text layers (renamed to “Text 1” and “Text 2” in this example) are not parented to anything and have not been scaled, you should be use position expressions like these to center the combined length (plus a gap between them).
Expression for Text 1:
gap = 20;
w1 = thisComp.layer("Text 1").sourceRectAtTime(time,false).width;
w2 = thisComp.layer("Text 2").sourceRectAtTime(time,false).width;
centerX = thisComp.width/2;
targetX = centerX - (w1 + gap + w2)/2;
curX = value[0] + sourceRectAtTime(time,false).left;
offsetX = curX - targetX;
value - [offsetX,0]
Expression for Text 2:
gap = 20;
w1 = thisComp.layer("Text 1").sourceRectAtTime(time,false).width;
w2 = thisComp.layer("Text 2").sourceRectAtTime(time,false).width;
centerX = thisComp.width/2;
targetX = centerX + (w1 + gap + w2)/2 - w2;
curX = value[0] + sourceRectAtTime(time,false).left;
offsetX = curX - targetX;
value - [offsetX,0]