Step 1: Identify the structure of serine
Serine has the structure:
\[
NH_2-CH(CH_2OH)-COOH
\]
Along with amino and carboxyl groups, it contains:
\[
-OH
\]
group.
So,
\[
X = -OH
\]
Step 2: Identify the structure of cysteine
Cysteine has the structure:
\[
NH_2-CH(CH_2SH)-COOH
\]
Along with amino and carboxyl groups, it contains:
\[
-SH
\]
group.
So,
\[
Y = -SH
\]
Thus,
\[
X = -OH,\qquad Y = -SH
\]
\[
\boxed{(-OH),(-SH)}
\]
Therefore, the correct answer is:
\[
\boxed{(B)}
\]