Just set the position to the original position at the start of the function. You could use defines to make the code easier to customize:
Code:
#define LOOPTXT_PAN_ORIGINAL_X 1054
#define LOOPTXT_PAN_ORIGINAL_Y 350
PANEL* looptxt_pan =

{

	bmap = "nextstage.tga";
	pos_x = LOOPTXT_PAN_ORIGINAL_X ;
	pos_y = LOOPTXT_PAN_ORIGINAL_Y ;
	layer = 50;	
}
function looptxt()
{
	wait(3);
	looptxt_pan->pos_x = LOOPTXT_PAN_ORIGINAL_X ;
	looptxt_pan->pos_y = LOOPTXT_PAN_ORIGINAL_Y ;
	set(looptxt_pan,SHOW | OVERLAY);
	while(1)
	{
		looptxt_pan->pos_x = cycle(looptxt_pan->pos_x -30 * time_step,-bmap_width(looptxt_pan->bmap),screen_size.x);
		wait(1);
	}
}