Contextually in this lineup, I agree with your answer that 2022 Arraez would be more valuable than 2023 Gallo, but I don't agree with your math. I don't think its anywhere close to 2.5 times different.
First, it's not apples-to-apples to compare the hit total of a guy who got 3.72 plate appearances per game (Arraez) with a guy who's gotten 2.54 plate appearances per game. Give Gallo the same number of opportunities, and those 67 hits become 98 hits.
Second, while 98 is still significantly below Arraez's 173, a hit by Gallo is worth much more than a hit by Arraez. For example, 42 percent of Gallo's hits have resulted in an instantaneous run (by homer). So extrapolating, 98 hits would include 41 homers for Gallo, compared to the eight Arraez provided. Said another way, the average Arraez hit went for 1.33 bases, whereas the average Gallo hit has gone for 2.53 bases, so a Gallo hit is nearly twice as valuable. Said still another way, a runner on first has a good chance of scoring on a Gallo hit, but will rarely do so on an Arraez hit. A runner on second may score on an Arraez hit, but will almost always score on a hit by Gallo.
Your 2.5 times was pretty rudimentary, so I'll go another rudimentary direction. If Arraez has a (173/98 =) 1.76 advantage in hits, but his hits are only (1.33/2.53=) 53 percent as valuable, he's only 93 percent as valuable as Gallo. (I've also ignored that Gallo has walked in 13 percent of his plate appearances, compared to Arraez's 8.3. Over the 603 plate appearances 2022 Arraez had, 2023 Gallo gets an additional 30 walks, which is fairly significant.)
So again, I agree that the context tilts in Arraez's favor, but I don't think the difference is that large. Perceptually it is, because Gallo frustrates us so much with strikeouts, but last night's eighth-inning at bat is also an example of the massive woot-woots that are much more likely to come with Gallo.*
*I will use much less math in the game thread.