Let the smaller leg be x.
Thus, larger leg = 3 +x
Thus, hypotenuse = 6 + x
Applying pythagoras theorum ;
[tex](6+x)^2 = x^2 + (3+x)^2 \\ \\ or, 6^2 + 12x + x^2 = 3^2 + 6x + x^2 \\ \\ i.e., 36 + 12x = 9 + 6x \\ \\ =>6x = 45 \\ \\ => x = 9[/tex]
Thus, the length of smaller peg is 9 cm.