It might be extended to support \xa^2_i, but it doesn't seem a good idea to add complications.
Explanation
The command \newsubcommand defines an abbreviation where the first argument is the command to define, the second is the main letter and the third is the fixed subscript.
The macro \xa defined in the example will look whether the following character is _ and, if so, it will merge the subscripts.
Best Answer
It must be either
for a real double (in fact a triple) subscript or
if everything should be in a single subscript line, which is what you want to achieve, I guess ...