Killing a process started by another user requires executing the kill command as root/administrator which is usually not an option.
But you may implement some kind of IPC (Inter Process Communication) in your application that reacts on a specific command to terminate the process. An example would be using a TCP or UDP server listening on a localhost port.
Another common solution is doing the opposite:
Deny starting the application if another instance is already running.
This can be detected by using some kind of mutex or a lock file.
A lock file can be also used with the IPC method to check if another process needs to be terminated.
Pseudo code:
if lock file exists
send terminate command via socket
wait until lock file has been deleted
create lock file
start server to listen for termination command
server:
if termination command received
cleanup (stop server)
delete lock file
terminate