the number of 5p = 2x
and the number of 20p = x
the total value = y
(2x)*(.05) + (x)*(.20)= y .......eqa1
if all 5p became 20p
20p = 2x
5p = x
(x)*(.05) + (2x)*(.20)= y+6 ..... eqa2
subtract the equations
eq2 - eq 1
======================
0.05x + 0.4x =y+6
-
0.1x + 0.2x = y
======================
0.45x= y+6
-
0.3x =y
= 0.15x = 6
x = 40
so number of 5p = 80 coins
and number of 20p = 40 coins