Don't touch the (512x+3) and go to the next one 3(4x+1) multiply it and remember the rule *+×+=+, - + - =, - + += -* after that multiply the next one.
512×+3= ○x+○-○x-○
then move the x numbers on left and change the - to + and change + to - just leave the 512x because its already on the place. and if you moved the x numbers on the left all you need to do is to move +3 after you move it you jave to change the positive sign to negative sign.
that's the formula sorry for mh grammar