Suppose that Carol has x 10p coins in her purse. Since she has three times as many 20p coins as 10p coins, then she has 3x 20p coins in her purse.
x coins of 10p value $0.10x and 3x coins of 20p value $0.60x.
In total this amount of money is $(0.10x+0.60x)=$0.70x that is exactly $4.20. Thus, you get the equation
0.70x=4.20.
Solve it:

Carol has 6 coins of 10p and 3·6=18 coins of 20p.