It is nigh on impossible for a ground observer to estimate the altitude of an aircraft but how high do you think they were? Are you sure they were at the same altitude? If not, they may have been 1000 ft apart and therefore legally separated. In busy airspace you will see such things on a daily basis. It looks scary, but it is totally safe.