I’m not sure exactly what you’re asking, but if you set your comp name up like this:
“First_Second_Third”
Then you could have expressions like this for your first line:
s = thisComp.name.split("_");
s[0]
and this for your second line:
s = thisComp.name.split("_");
s[1] + " " + s[2]
or, like this for your first line:
s = thisComp.name.split("_");
s[0] + " " + s[1]
and this for your second line:
s = thisComp.name.split("_");
s[2]