To find a point 500m behind the player use:
X coordinate = (getPos player select 0) - 500*sin(getDir Player)
y coordinate = (getPos player select 1) - 500*cos(getDir Player)
You will need to teleport them one at a time, you cannot setPos a group as a whole.
If you want them to keep in formation then I suggest something like:
_relPos = []
{_relPos = _relPos + [[(getPos leader group _x select 0)-(getPos _x select 0),(getPos leader group _x select 1)-(getPos _x select 1)]]} forEach units groupname
This will give you an array of relative positions. Then setPos the leader of the group 500m behind the player as above. Then setPos the units of the group using the relative position you calculated earlier. You might also want to modify the relative posisions so that the formation is facing towards the player. Happy to help with all of that, but I am not sure what you need exactly. My guess is that if they are not vehicles then setPossing them all to the same point 500m behind the player would be sufficient as they will quickly sort themselves out. The code for that is:
{_x setPos [(getPos player select 0) - 500*sin(getDir Player),(getPos player select 1) - 500*cos(getDir Player),0]} forEach units groupname
Done from memory and so not tested