I'll give you an example
y= 2x+56a-16a+14x
y=16x+40a
you basically just do the letters that are the same together i hope it make sense to you