Let $U_n$ be the set of pairs of first kind (hence $|U_n|=a_n$) and $V_n$ be the set of pairs of second kind (hence $|V_n|=b_n$). Induct on $n$. Verify $n\le 3$ by hand. Assume $a_n=b_n$. Note that
\[
U_{n+1}\setminus U_n =\bigl\{1\le x\le n+1:x+n+1\equiv 0\pmod{2}\bigr\}
\]since if $y\le n$ then $(x,y)\in U_n$ already. From here, we find $a_{n+1}-a_n = \lceil \frac{n+1}{2}\rceil$. Next,
\[
V_{n+1}\setminus V_n = \bigl\{1\le x\le y\le n:x+y=n+2\bigr\}\cup\{(1,n+1)\}.
\]Indeed, if $y=n+1$ then $(x,y)=(1,n+1)$ is the only pair in $V_{n+1}$; whereas for $y\ne n$ if $x+y\le n+1$ then $(x,y)\in V_n$. We easily see that
\[
\Bigl|\bigl\{1\le x\le y\le n:x+y=n+2\bigr\}\Bigr| = \left\lceil \frac{n-1}{2}\right\rceil,
\]which yields $b_{n+1}-b_n=a_{n+1}-a_n$. As $a_n=b_n$ by inductive hypothesis, the proof is complete.