Move each square into an outlined area. A selected square can only be moved by another square next to it. You must think carefully before selection of the square to move in the right direction.
Sometimes you need to move out of the outlined area in order to fit all the squares. Try to fit all squares of all levels.