You do not enter a dependent's earned income reported on a W-2 on your tax return.
If the dependent's income reported on the W-2 was less than $6,300 and they have no other income, then they do not have to file a tax return. If they do file a tax return then they Must indicate on their tax return that they can be claimed as a dependent on someone else's return.