Simple signal wire over 5-7m distance

If the 2 are going to communicate, the grounds must be connected. The ground is the reference for signals between them.

You may be able to get wired 5V serial communication to work over that distance. If not, RS485 is a good candidate for that.

A wireless solution might be the RF24L01 radios. They may be less expensive than wire and are pretty easy to use. See Robin2's simple rf24 tutorial.

If the connection is one way, 433MHz radios are really cheap.