Insert into a table a foreign key
Firstly, your datatypes and precision should always be identical on your FK references. 

In Habitat you have HNome as a VARCHAR(100). In Cotem, you have HNome as a VARCHAR(64).  These need to be the same.

It would help if you would post the error message you are getting, but I suspect the error is you are trying to insert a NULL value into ANome in Cotem.