A man can commute either by train or by bus. If he goes to work on the train in the morning, he comes home on the bus in the afternoon; and if he comes home in the afternoon on the train, he took the bus in the morning. During a total of $x$ working days, the man took the bus to work in the morning $8$ times, came home by bus in the afternoon $15$ times, and commuted by train (either morning or afternoon) $9$ times. Find $x$.
$\textbf{(A)}\ 19 \qquad \textbf{(B)}\ 18 \qquad \textbf{(C)}\ 17 \qquad \textbf{(D)}\ 16 \qquad \\ \textbf{(E)}\ \text{ not enough information given to solve the problem}$
The man has three possible combinations of transportation:
\[\text{Morning train, Afternoon bus (m.t., a.b.)}\]
\[\text{Morning bus, Afternoon train (m.b., a.t.)}\]
\[\text{Morning bus, Afternoon bus (m.b, a.b.)}\].

Let $y$ be the number of times the man takes the $\text{a.t.}$. Then, $9-y$ is the number of times he takes the $\text{m.t.}$. Keep in mind that $\text{m.b.}=y$ and $\text{a.b.}=9-y$.

Let $z$ be the number of times the man takes the $\text{m.b.}$ and $\text{a.b.}$. Now, we get the two equations \[y+z=8\] and \[9-y+z=15.\]
Solving the system of equations, we get $y=1$ and $z=7$.

So during the $x$ working days, the man took the $\text{(m.t., a.b.)}$ on $9-1=8$ days, the $\text{(m.b., a.t.)}$ on $1$ day, and the $\text{(m.b., a.b.)}$ on  $7$ days.

Therefore, $x=8+1+7= \boxed{\textbf{(D)}\ 16}$. ~[jiang147369](https://artofproblemsolving.com/wiki/index.php/User:Jiang147369)