Answer:
Step-by-step explanation:
Let us assume the king before leaving his castle had x silver coins.
For the first peasant he met he gave
[tex]\frac{x}{2} +2[/tex]
Now he is left with
[tex]x-(\frac{x}{2} +2)\\=\frac{x}{2} -2[/tex]
Next peasant he gave half of what he had and two more
Hence next peasant got
[tex]\frac{1}{2} (\frac{x}{2} -2)\\=\frac{x}{4} -1[/tex]
Balance left =[tex]\frac{x}{2} -2-( \frac{x}{4} -1)\\=\frac{x}{4} -1[/tex]
Third peasant got half + 2 more
Hence third peasant got
[tex]\frac{1}{2}( \frac{x}{4} -1)\\=\frac{x}{8} -\frac{1}{2}[/tex]
Balance he had
[tex]\frac{x}{4} -1-(\frac{x}{8} -\frac{1}{2} )\\\frac{x}{8} -\frac{1}{2}=2\\\frac{x}{8}=\frac{5}{2}\\x=20[/tex]