40 base 5 is 4*5=20 base 10. So 40base 5 % is 20%. It's assumed that percentage is in decimal terms, that is, 20% is 20/100=1/5 (0.2 decimal or 0.1 base 5), not 20/25 where 100 base 5 is 5^2=25 decimal, whereas 100 decimal is 400 base 5.
If the cost of soap is S, so the increased price is 1.2S (decimal). 0.2 decimal =1/5 is 0.1 in base 5 so the increased price is 1.1S in base 5.
If 1.1S is reduced by 20% the final price is 0.8*1.2S=0.96S. In base 5 this is 0.4*1.1S=0.44S.
The final price is 96% of the original price. 0.44 in base 5 is 24/25=0.96 decimal. 96 decimal is 341 in base 5 (3*25+4*5+1=75+20+1=96).