You should add an Else to Image5MouseMove procedure to correct image position if it is outside of movable area:
procedure TForm1.Image5MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if
move and
(Image5.Left>(PinStartingPosition-75)) and
(Image5.Left<(PinStartingPosition+75))
then
Image5.Left:=Image5.Left+x-PinCurrentPosition;
else if Image5.Left<=(PinStartingPosition-75) then
Image5.Left:= PinStartingPosition-75+1
else if Image5.Left>=(PinStartingPosition+75) then
Image5.Left:= PinStartingPosition+75-1;
end;