The meaning of “Apai” is to take/carry/convey, you know the meaning of Ariki already. The name is most commonly given to boys.
If you go on maori.org.ck website which is a Maori Database of Cook Islands words and search the words Apai you will find this meaning. “Te” means “the”.
Therefore the meaning of Teapai Ariki is bring/carry/convey to the chief messages, information etc.
It will be good to know who the family name of your in-law is. As names are passed on by family and it is up to them to give it to whoever they want.