To answer why your example doesn't work:
The spec calls \x a "hexadecimal escape sequence".
A hexadecimal escape sequence represents a single Unicode character, with the value formed by the hexadecimal number following "\x".
The grammar only permits literal hexadecimal digits to be used in this way. ANTLR grammar:
hexadecimal_escape_sequence
: '\\x' hex_digit hex_digit? hex_digit? hex_digit?;
hex_digit
: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
| 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
meaning, "the sequence \x followed immediately by one, two, three, or four hexadecimal digits". Thus, the escape can only be used as a literal in source code, not one concatenated at runtime.
Charlieface provided a good alternative for your case, though depending on the context you may want to rethink your organization and just have a single string holding the characters instead of two.