Ditch the String object all together and just use the string you already have.
It seems like you only convert it to String so you can use the + operator and charAt member function. Much easier to work with the char arrays:
char num[3];
char pos[4];
strncpy(num, inData, 2);
num[2] = '\0';
strcpy(pos, inData+3);
You don't even need the second array, since you will just be passing it into atoi(), you can just pass inData+3 to it.
You should also extend that char array out a bit. You are using 5 numbers plus a null, so you need 6 bytes, but you only give it 4.