25 yuan, originally paid by these three people to the boss, plus 2 yuan, is owned by Xiaoerzang, plus 1 yuan *3 people =3 yuan, which happens to be 30 yuan.
Or we can think of it this way: 9 yuan paid by three people * three people =27 yuan, including 25 yuan for the boss and 2 yuan left by the second child, plus 1 yuan brought back by three people, which is exactly 30 yuan.
So, there is nothing wrong with it.