The formation of a quadruple star system with wide separation