Final answer:
Matt used a total of 127 carpet tiles.
Step-by-step explanation:
To find the total number of carpet tiles used, we need to add the number of red tiles used and the number of green tiles left.
Since Matt used 96 red tiles, the number of carpet tiles used in making the rug is 96.
After making the rug, he had 31 green tiles left. So, the total number of carpet tiles used in all is 96 + 31 = 127.