Did Texas used to belong to Mexico?

Up until the 1800's, yes.