User blog comment:TheBrickKeeper/Tekkit Classic Server Problems/@comment-1757231-20140206005305

Both computers need to be connected to the same IP (router) for it to work, unless you feel like Port Forwarding/Using Hamachi. This guide on the Minecraft wiki is very helpful.

Note: If you do decide to Port Forward, realise that there are risks to doing so.