The correct answer is B. It was legal because it did not violate the Fourteenth Amendment.
The Supreme Court decision in Plessy v. Ferguson established the "separate but equal" doctrine, which upheld the constitutionality of racial segregation laws for public facilities as long as the segregated facilities were considered equal in quality. Therefore, it deemed that segregation itself did not violate the Fourteenth Amendment's Equal Protection Clause.