Maybe this will help. I don't know why you want to do this. But I can think of two ways you can "impersonate" another user.
First, you can impersonate another AD user if you know their password. Just go into Start Menu, find Management Studio, hold down SHIFT + Right-Click -> Run as different user. Then type in the username/password of the other user. Now Management Studio will run under their credentials. Any queries you run from that Management Studio window will run as the other user.
There is another way. A linked server object can be configured to connect to the target server using different credentials. So you could setup a linked server object on Server A that points to Server B. When user Y runs a query through the linked server, you can configure it to run under the credentials of user Z. There are some tricky issues here with Kerberos and whatnot, but it is possible.