Let $x$ be the number of 2-bed rooms, $y$ the number of 3-bed rooms. 161 beds in total means $2x+3y=161$, and there are 68 rooms so $x+y=68$.
Since you've tagged this as linear algebra, this is the system in matrix-form:
$$\begin{bmatrix}1&1\\\2&3\end{bmatrix}\begin{bmatrix}x\\\y\end{bmatrix}=\begin{bmatrix}68\\\161\end{bmatrix}$$
Row-reduce and you're done.