Do not worry, you are safe, in a sense. Your IP cannot be figured out just by logging into Runescape, because as far as I know, Runescape does not make your IP available to the public, or even the users/moderators.
However, if your account was hacked, that is another thing. The person may have hacked your account through keylogging, or through previously hacking your computer. If that's the case, i cannot help you.