I understand everything up onto the 2c = 6 part. How did you go from 2cx + 10 + c =6x + d to 2c = 6?
And also solving c, you get c = 3 therefore d = 13.
For the left hand side to be exactly the same as the right hand side, 2c must be equal to 6, as the coefficients of the x term must be same on both sides of equation.