The correct answer is B. they were both once owned by Mexico.
Both Texas and California were territories that were part of Mexico before becoming part of the United States. Texas gained independence from Mexico in 1836 and was annexed by the U.S. in 1845, while California became a part of the U.S. as a result of the Mexican-American War and the Treaty of Guadalupe Hidalgo in 1848.