What I think he did wrong was he only had $20 at this table. I believe the max buy in is $50 am I right??
Therefore, he should have bought in for $50 and he would have made an extra $30 from this pot.