Наверное, потому что не выполняется условие, надо так
Код:
if Shape1.Left < 248 then Shape1.Left:= Shape1.Left + 1;
if Shape2.Left < 248 then Shape2.Left:= Shape2.Left + 1;
if ((Shape1.Left = 248) and (Shape2.Left =248 )) then
begin
if Shape1.Top > 96 then Shape1.Top:= Shape1.Top - 1;
if Shape2.Top < 344 then Shape2.Top:= Shape2.Top + 1;
end;
if ((Shape1.Top = 96) and (Shape2.Top = 344)) then
begin
if Shape1.Left < 328 then Shape1.Left:= Shape1.Left + 1;
if Shape2.Left < 440 then Shape2.Left:= Shape2.Left + 1;
end;