This is a linear equation problem with two variables. One way to solve it is by using the substitution method. Let x be the price of the tie and y be the price of the pair of pants. Then we have:
$$
\begin{aligned}
x + y &= 87.18 \\
x &= y - 2.12
\end{aligned}
$$
Substituting x into the first equation, we get:
$$
\begin{aligned}
(y - 2.12) + y &= 87.18 \\
2y - 2.12 &= 87.18 \\
2y &= 89.30 \\
y &= 44.65
\end{aligned}
$$
Therefore, the price of the pair of pants is $44.65. To find the price of the tie, we plug y into the second equation:
$$
\begin{aligned}
x &= y - 2.12 \\
x &= 44.65 - 2.12 \\
x &= 42.53
\end{aligned}
$$
Therefore, the price of the tie is $42.53.