a) \(\left(x+y\right)^2-\left(x-y\right)^2\)
\(=\left(x+y-x-y\right).\left(x+y+x-y\right)\)
\(=2x.\)
b) \(\left(3x+1\right)^2-\left(x+1\right)^2\)
\(=\left(3x+1-x+1\right).\left(3x+1+x+1\right)\)
\(=\left(2x+2\right).\left(4x+2\right)\)
\(=2.\left(x+1\right).2.\left(2x+1\right)\)
\(=2.\left(x+1\right).\left(2x+1\right)\)
Chúc bạn học tốt!