You can use TTimer for the animation. As for moving the panel can either have a separate floating point vector and Round() it to panel new position or simply:
Panel2.Left:=Panel2.Left+X_Speed;
Panel2.Top:=Panel2.Top+Y_Speed;
Count collision with Width properties and if hits, turn X or Y_Speeds around.