mtsal,
Maybe I am just thnking in the wrong direction on what you exactly want, but lets give it a try:
You can not get the hostname of another switch if you are on a switch using telnet or through console. You could however hop through and telnet the other switch and check the hostname. (This only works if your security settings allow it)
It is also not really clear to me if those switches are stacked, directly connected or are far apart. If the switches are stacked and/or directly connected you can check the neighboring switches hostnames using cdp (show cdp neigh) providing cdp is enabled on the interfaces to wich they are connected.
if I am totaly off track here please tell us exactly what the goal is of knowing the hostname..
InDenial