After eating a hearty meal they went to see the Buckingham palace. There, Rachel learned that w visitors came to the Buckingham palace that day. If there were x visitors the previous day and y visitors the day before that How many visited the Buckingham palace before that day?
Let's say that the number of visitors on the day before Rachel's visit was z. Then we have the following system of equations:
$$
\begin{cases}
z+x=y\\
y+x=w\\
\end{cases}
$$
$$
\begin{cases}
z=y-x\\
y=w-x\\
\end{cases}
$$
$$
\begin{cases}
z=w-2x\\
\end{cases}
$$
Now we have only one equation with one unknown, which we can easily solve:
$$
z=w-2x \Rightarrow z=w-2(y-z) \Rightarrow z=\frac{w+z}{2}
$$
Thus, the number of visitors on the day before Rachel's visit was $\frac{w+z}{2}$.