Command last displays wrong hostname

I faced an interesting problem on my AIX servers. When I checked last logins with command last I saw that hostnames are wrong. Let say, I made login from workstation xxxxx and with the command last I saw:

root pts/2 yyyyy 5 jan 15:38 still logged in

Ping xxxxx and ping yyyyy from AIX server are correct, nslookup is correct as well.

Have you tried reverse as well as forward DNS resolution on the names?
Some unix (I know HP-UX is one) keep both a (truncated) hostname and an IP address in the /etc/utmpx and will use one in preference to the other, and I have seen times when they dont match.

The server name recorded will normally be the same as "Name:" from "nslookup" when run on the server keeping the records (in this case your AIX server). This can be different from the actual name of the client.

Afterthought: Maybe you have a duplicate IP address.

I got one explanation for this problem. Revers zone on DNS Servers are not deleted. As a result records of old workstations remain in cache.
Thanks.