$12{c}^{2}d-2cd+8c{d}^{2}+{c}^{2}d-4cd-\left( 5cd-2c{d}^{2} \right)$
Factor out $cd$ from the expression$12{c}^{2}d-2cd+8c{d}^{2}+{c}^{2}d-4cd-cd \times \left( 5-2d \right)$
Collect like terms$13{c}^{2}d-2cd+8c{d}^{2}-4cd-cd \times \left( 5-2d \right)$
Collect like terms$13{c}^{2}d-6cd+8c{d}^{2}-cd \times \left( 5-2d \right)$
Factor out $cd$ from the expression$cd \times \left( 13c-6+8d \right)-cd \times \left( 5-2d \right)$
Factor out $cd$ from the expression$cd \times \left( 13c-6+8d-\left( 5-2d \right) \right)$
When there is a $-$ in front of an expression in parentheses, change the sign of each term of the expression and remove the parentheses$cd \times \left( 13c-6+8d-5+2d \right)$
Calculate the difference$cd \times \left( 13c-11+8d+2d \right)$
Collect like terms$cd \times \left( 13c-11+10d \right)$