D=\(\dfrac{abc+a+b+c-1-ab-bc-ca}{a^2b+1-a^2-b}\)
\(=\dfrac{\left(abc-bc\right)-\left(ca-c\right)-\left(ab-b\right)+\left(a-1\right)}{\left(a^2b-a^2\right)+\left(1-b\right)}\)
\(=\dfrac{bc\left(a-1\right)-c\left(a-1\right)-b\left(a-1\right)+\left(a-1\right)}{a^2\left(b-1\right)+\left(1-b\right)}\)
\(=\dfrac{\left(a-1\right)\left(bc-c-b+1\right)}{a^2\left(b-1\right)-\left(b-1\right)}=\dfrac{\left(a-1\right)\left[\left(bc-c\right)-\left(b-1\right)\right]}{\left(b-1\right)\left(a^2-1\right)}\)
\(=\dfrac{\left(a-1\right)\left[c\left(b-1\right)-\left(b-1\right)\right]}{\left(b-1\right)\left(a-1\right)\left(a+1\right)}=\dfrac{\left(a-1\right)\left(b-1\right)\left(c-1\right)}{\left(b-1\right)\left(a-1\right)\left(a+1\right)}\)
\(=\dfrac{c-1}{a+1}\)