a) Notice that both variables that were measured are categorical, since they take on values that are category names.
This is the crucial (and only) requirement for constructing a two-way table, and since that requirement is met, is is appropriate to construct a two-way table.

b) Notice that both variables are quantitative, since they take on values that are numerical values. Since a two-way table can only be constructed with categorical variables, it is not appropriate to construct a two-way table.

b) Notice that both variables are quantitative, since they take on values that are numerical values. Since a two-way table can only be constructed with categorical variables, it is not appropriate to construct a two-way table.