Question: how to connect iphone and ipad messages?
Answer: Each device is signed in to iCloud with the same Apple ID.
On iPhone, go to Settings > Messages > Send & Receive. ... 
On iPhone, go to Settings > Messages > Text Message Forwarding, then choose which devices to allow to send and receive text messages from this iPhone.