I am using the nickname "Jack" in the Stack Overflow chat, but today there is someone else chatting with the same name. So all of our messages are mixed up. And another thing is that all of my friends on Stack Overflow know me using the name "Jack". Please is there anyway that this can be stopped?
This isn't really a bug... If 100 people are standing around in a crowded room, and I suddenly yell "Jack!", it should really come as no surprise that both of the people named Jack spin around and look at me.
The solution, of course, is simple: Change your name to something else that minimizes ambiguity. A son who has the same name as his father will often go by another name (at least while at home) to make it easier for the mother to gripe at only one of them at a time.
For whatever reason, you've chosen a different name for your account here on Meta: "rubyid10". That seems like a good alternative nickname to use in chat. It won't take very long for your friends who know you by "Jack" to learn that you've changed your alias and start associating you with that handle, instead.
There was a bug at one time that made it difficult to distinguish between two people with the same first names, but that bug has now been fixed. The chat system supports more granular naming, allowing @reply comments to be addressed to the full names of other users, rather than just the first three characters. So you could try adding a last name (or whatever other differentiating phrase you like) to your existing name Jack. The autocomplete for @replies will still make it easy for your friends to type your chat alias and get in contact with you.