The correct answer is:
B. It was legal because it did not violate the Fourteenth Amendment.
The Supreme Court's decision in Plessy v. Ferguson upheld the constitutionality of racial segregation under the "separate but equal" doctrine, stating that such segregation did not violate the Equal Protection Clause of the Fourteenth Amendment.