It is very simple.
If you have $40 and want to find out how much 20% off of the item is all you do is subtract the price from the discounted price as shown below.
$40-20%=
20% of $40 is 8
so $40-8=$32
You will now add 5% to the discounted price.
$32+5%=
5% of 32 is 1.6
32+1.6=$33.06
The total cost of the shirt is $33.06
So Lydia paid $33.06
Hope this helps :)