Yes, I see

Change it to this... then it should work.

Code:
  if (R5Direction='RIGHT')then 
  begin 
    X:=x+Speed1*dx; 
    if (X>GameAreaX2-Image.width)then 
      r5direction:='LEFT'; 
  end;