Use a VNC server on the tab and a VNC client on the S4. Look for vnc in the play store and you'll find lots of free servers and free clients. (They're all about the same, so just pick two, install them, run the server (it should tell you the IP address to connect to), run the client and connect to the IP address, and you're remotely controlling the tab from the S4.