1)
\(\left(a+b\right)^5-a^5-b^5\)
\(=\left(a^5+5a^4b+10a^3b^2+10a^2b^3+5ab^4+b^5\right)-a^5-b^5\)
\(=5a^4b+10a^3b^2+10a^2b^3+5ab^4\)
\(=5ab\left(a^3+2a^2b+2ab^2+b^3\right)\)
\(=5ab.\left[\left(a^3+a^2b+ab^2\right)+\left(b^3+a^2b+ab^2\right)\right]\)
\(=5ab.\left[a.\left(a^2+ab+b^2\right)+b.\left(a^2+ab+b^2\right)\right]\)
\(=5ab.\left(a+b\right)\left(a^2+ab+b^2\right)\)
2)
\(\left(a+b\right)^7-a^7-b^7\)
\(=\left(a^7+7a^6b+21a^5b^2+35a^4b^3+35a^3b^4+21a^2b^5+7ab^6+b^7\right)-a^7-b^7\)
\(=7a^6b+21a^5b^2+35a^4b^3+35a^3b^4+21a^2b^5+7ab^6\)
\(=7ab.\left(a^5+3a^4b+5a^3b^2+5a^2b^3+3ab^4+b^5\right)\)
\(\ne7ab\left(a^3+2a^2b+2ab^2+b^3\right)\)
\(=7ab.\left[\left(a^3+a^2b+ab^2\right)+\left(b^3+a^2b+ab^2\right)\right]\)
\(=7ab.\left[a.\left(a^2+ab+b^2\right)+b.\left(a^2+ab+b^2\right)\right]\)
\(=7ab.\left(a+b\right)\left(a^2+ab+b^2\right)\)