a. \(ab+b\sqrt{a}+\sqrt{a}+1=b\sqrt{a}\left(\sqrt{a}+1\right)+\left(\sqrt{a}+1\right)=\left(\sqrt{a}+1\right)\left(b\sqrt{a}+1\right)\)
b. \(\sqrt{x^3}-\sqrt{y^3}+\sqrt{x^2y}-\sqrt{xy^2}=\left(\sqrt{x}-\sqrt{y}\right)\left(x+\sqrt{xy}+y\right)+\sqrt{xy}\left(\sqrt{x}-\sqrt{y}\right)=\left(\sqrt{x}-\sqrt{y}\right)\left(x+2\sqrt{xy}+y\right)=\left(\sqrt{x}-\sqrt{y}\right)\left(\sqrt{x}+\sqrt{y}\right)^2\)