Given that:
A shirt was sold at a profit of $$15\%$$.
If the cost had been $$5\%$$ less, and it had been sold for $$Rs.\ 21$$ less, then the profit would have been $$10\%$$.
To find out:
The cost of the shirt.
Let the cost of the shirt be $$Rs.\ x$$.
We know that, $$S.P.=\dfrac{(profit\%+100)C.P.}{100}$$
Here, $$profit\%=15$$
$$\therefore\ S.P.=\dfrac{(15+100)x}{100}\\$$
$$\Rightarrow S.P.=1.15x\\$$
Now, if the cost is $$5\%$$ less, then,
$$C.P.=95\%\ of\ x\\$$
$$\Rightarrow C.P.=\dfrac{95}{100}x\\$$
$$\therefore \ C.P.=0.95x\\$$
Also, the selling price is $$Rs. \ 21$$ less.
$$\therefore\ S.P.=1.15x-21\\$$
In this case, the profit would have been $$10\%$$, as given in the problem.
Now, we know that, $$profit\%=\dfrac{S.P.-\ C.P.}{C.P.}\times 100$$
$$\therefore \ 10=\dfrac{(1.15x-21)-0.95x}{0.95x}\times 100\\$$
$$\Rightarrow 10=\dfrac{1.15x-21-0.95x}{0.95x}\times 100\\$$
$$\Rightarrow 10\times 0.95x=(0.20x-21)\times 100\\$$
$$\Rightarrow 9.5x=20x-2100\\$$
$$\Rightarrow 20x-9.5x=2100\\$$
$$\Rightarrow 10.5x=2100\\$$
$$\Rightarrow x=\dfrac{2100}{10.5}\\$$
$$\therefore \ x=Rs.\ 200\\$$
Hence, the cost of the shirt is $$Rs.\ 200$$.