Telnet?

I have setup my own server(just a windows XP service pack 2 installed) now i want my friend to connect to it. I understand that there are 2 ways to do this. You can type in your CMD:
telnet [IP Address] [PORT]

Or you could type: telnet

and then the telnet window will open and the you have to type: o [IP Address] [PORT]

Both of these just keeps on saying Connecting to [IP Address]...

And then after some time it says connection to host lost.

The server is in a virtual mechine so i dont know if that has something to do with it. Both my computers can access the internet.

In order to telnet to a port you have to have an application listeningn on that port. For example if you have IIS running then it listens on port 80 for any http traffic. You need to know that Windows XP is not a server OS. It is designed to allow only one person to connect or use it at a time. There is a built in applicaton and access program called Remote Desktop (referred to as RDP) that listens on port 3389 when activated and can be reached with the client which is normally found under accessories.
To turn on that ability to connect with RDP, right click on My Computer and select Properties. The select the Remote tab at the top and check the option to allow remote access.