30% of 21 is 3/10*21=6.3. Subtract 6.3 from 21=14.7. Another way of calculating the answer is that 30% off 100% is 70% and 70% of 21 is 14.7.
However, the context of your question suggests that the shirt was fully priced at x and 70% of x=£21, the sale price. That is, 7x/10=21, so x=210/7=£30.