This is accretive. A higher P/E means that you are paying more for every dollar of earnings, since the numerator is stock price and the denominator is earnings. If we take the reciprocal of P/E, which is earnings per share / stock price, then a higher P/E results in a lower return on equity.
A lower P/E means you are paying less for every dollar of earnings. If we take the reciprocal of P/E, a lower P/E results in a higher return on equity.
Therefore, the higher P/E company is more expensive, and the lower P/E company is cheaper, so this is like a more expensive company acquiring a less expensive company. The higher P/E stock has a lower return compared to the lower P/E. By acquiring earnings at a multiple that is cheaper than its own, it will increase its earnings per share. In other words, by acquiring a company that has a higher return on equity, the acquiror will increase its earnings per share.
Note that this is only true if it’s an all-stock deal. If there is debt or cash in the purchase as well, you would have to either use the earnings yield method or build a merger model to figure out if it’s accretive or dilutive.