Both may be mansub, but their questions differ.
جَاءَ الطَّالِبُ مُبْتَسِمًا
مُبْتَسِمًا answers: in what condition did the student come? It is haal.
عِنْدِي عِشْرُونَ كِتَابًا
كِتَابًا answers: twenty of what? It is tamyiz.
Haal describes a condition; tamyiz supplies a missing specification.