iPhone controlling iPad remotely: something like Hamachi I have searched for this around the web, but haven't found anything that was similar to what I was looking for. So here it goes.

Suppose I have one iPhone and one iPad, both being jailbroken. The iPhone is in the network A, while the iPad is in network B. Both networks have access to the Internet. My objective is to control the iPad using the iPhone. I should see the screen of the iPad on my iPhone and be able to run and control apps and input text.

Does anyone if this is possible (with the restrictions described above)?
There are two questions there. First:

How can I control my iPad from my iPhone

Since you have jailbroken the phone then the answer is to install Veency :

http://cydia.saurik.com/info/veency/ though I'm not sure it supports iOS7 yet.

The second:

How can I get VNC working across the internet?

You will have to configure port forwarding on the network that contains the iPad so that any VNC traffic that hits your home router goes to the phone. VNC usually lives on port 500 and last I checked Veency didn't allow you to change it.