$A_i$'s are collection of $m$ sets such that there are $p$ elements in each of them. $B_j$'s are collection of $n$ sets such that there are $q$ elements in each of them.
Any element in a given $A_i$ also occurs in exactly $\alpha -1$ other $A_i$'s $(\alpha \le m)$. Similarly any element in a given $B_j$ also occurs in exactly $\beta -1$ other $A_i$'s $(\beta \le n)$.
Also union of all $A_i$'s is identical with union of all $B_j$'s. This means same total objects make up both the collections, $\{A_i\}$ and $\{B_j\}$. These distinct objects are elements of (universal) set $S$.
Now there are $mp$ elements in total in $\{A_i\}$, each repeated exactly $\alpha$ times. Hence number of distinct elements in $\{A_i\}$ is only $$\dfrac{mp}{\alpha} $$
Similarly, number of distinct elements in $\{B_i\}$ is only $$\dfrac{nq}{\beta} $$
And given is $$|S| = \dfrac{mp}{\alpha} = \dfrac{nq}{\beta}$$