Suppose that $S$ is the set of roots of $P$, and that $R$ is the set of roots of $P-1$.
We have
$$
P(X)=a\prod_{s\in S}(X-s)^{n_s},\quad Q(X)=b\prod_{s\in S}(X-s)^{m_s}
$$
and
$$
P(X)-1=a\prod_{r\in R}(X-r)^{n'_r},\quad Q(X)-1=b\prod_{r\in R}(X-r)^{m'_r}
$$
Now, Clearly $S\cap R=\emptyset$, and every $s\in S$ is a root of multiplicity $n_s-1$ of $P'$ and every $r\in R$ is also a root of multiplicity $n'_r-1$ of $P'$. This implies that
$$\eqalign{\deg P-1&=\deg P'\geq \sum_{s\in S}(n_s-1)+\sum_{r\in R}(n'_r-1)\cr
&\geq \deg P-|S|+\deg P-|R|
}
$$
or equivalently
$$
\deg P< |S|+|R|.
$$
Similarly, we have
$$
\deg Q< |S|+|R|.
$$
But then, if $T=P-Q$, then $T$ has degree smaller than $|S|+|R|$ and has $|S|+|R|$ roots,
namely the elements of $R\cup S$. So, $T$ has to be the zero polynomial.$\qquad\square$