First, forget telnet. No Mac should be running telnet.
Secondly, you say the remote Mac is 'in a local network via ADSL'.
Do you mean it's local (i.e. both Macs are on the same network), or it's behind some other DSL router that's running NAT?
If it's local you shouldn't have a problem, but if it is remote you need to setup port forwarding so that you can get to it from the outside. Which ports you need to forward depends on the method you use to quit the other app, of which there are several.
All options require some kind of remote access protocol to be enabled. If the machine isn't running SSH, for example, you won't be able to ssh into the machine anyway.
The crudest option is to ssh into the remote machine and just issue a
kill command.
kill requires the PID (process ID) of the application you're trying to quit, so you can either use
ps to find the process ID, or use
killall which takes a process name.
Kill will simply terminate the app, so any unsaved data will be lost.
SSH requires port 22 to be forwarded to the internal machine.
A gentler approach would be to use AppleScript to tell the application to quit.
If Remote Apple Events are enabled on the machine, and port 3031 is forwarded in your router, you can use something like this in Script Editor:
<pre class=command>tell application "appName" of machine "eppc://ip.address.of.remote.mac/" to quit</pre>
This will gracefully tell the application on the remote machine to quit. However, it may prompt the user to save unsaved data, and may hang if there's no one there to acknowledge the request.
Depending on the application in question you may be able to get around that - some applications support a 'saving' parameter to the
quit command - tell application... to quit saving no - but you'd need to check the specific application directory to see if this is supported or not.