Quad-frequency signals have thus far been available for all satellites of BeiDou-3 and Galileo systems. The major benefit of quad-frequency signals is that more extra-wide-lane (EWL) combinations can be formed with quad-frequency than with triple- or dual-frequency, of which the ambiguities can be fixed instantaneously in medium and long baselines. In this paper, the long-baseline positioning algorithm based on optimal triple-frequency EWL/wide-lane (WL) combinations of BeiDou-3 and Galileo is proposed. First, the theoretical precision of multi-frequency combinations of BeiDou-3 and Galileo is studied, and EWL/WL combinations with a small noise amplitude factor and a small ionospheric scalar factor are selected. Then, geometry-free methods are used to estimate the a priori precision of EWL/second EWL/WL signals for different combination schemes. Second, the double-differenced (DD) geometry-based function models of quad-frequency configurations and three different triple-frequency configurations are given, and the DD ionospheric delays are estimated as unknown parameters. In the end, the real BeiDou-3 and Galileo data are used to evaluate the positioning preference. The results show that, when using fixed EWL observations to constrain WL ambiguities, the proposed triple-frequency EWL/WL signals composed of (B1I,B3I,B2a) of BeiDou-3 and (E1,E5a,E6) of Galileo can achieve the same precision as the quad-frequency signals. Therefore, the method proposed in this article can realize long-baseline instantaneous decimeter-level positioning while reducing the dimension of matrix and improving calculation efficiency.