A question regarding commutators in quantum mechanics I propose the following thought experiment:
Suppose we have a beam of identically prepared electrons that is splits into two. The first goes through detector A that detects the $x+y$ where $x$ is the coordinate along x direction and $y$ is the coordinate along the $y$ direction. Then, we measure the difference of the momenta of the electrons in the  $x$ and $y$ directions i.e. $p_{x}-p_{y}$. Then, according to the postulates of quantum mechanics, we can measure the both quantities to arbitrary precision since
$$ [x+y, p_{x}-p_{y}]=[x,p_{x}]-[y,p_{y}]=0$$
The second beam of electrons is subjected to a similar measurement by a detector B but this time we measure $x-y$ and then measure the sum of momenta i.e. $p_{x}+p_{y}$. Then, again we can measure $x-y$ and $p_{x}+p_{y}$ to arbitrary precision because
$$ [x-y, p_{x}+p_{y}]=[x,p_{x}]-[y,p_{y}]=0$$
Then, adding the results of the measurements we have $(x+y)+(x-y)=2x$ and then $(p_{x}-p_{y})+(p_{x}-p_{y})=2p_{x}$. Both of which, $x$ and  $p_{x}$ can be measured to arbitrary precision thus violating the uncertainty principle.
If on the other hand, we carry out this experiment and find that we are not able to measure the above quantities to arbitrary precision then it follows that the postulates of quantum mechanics do not correctly predict the outcome of the experiment in the sense that the commutator vanishes but we can't measure the quantities to arbitrary precision.
Does this mean that the postulates of quantum mechanics are inconsistent? (I certainly don't hope so!)
 A: It would be far simpler to just directly measure $x$ of your first beam and $p_x$ of the second beam.

Both of which, $x$ and $p_x$ can be measured to arbitrary precision thus violating the uncertainty principle.

There is no violation of the uncertainty principle. If you have an unlimited supply of identically prepared systems you can measure to arbitrary precision (in principle). The uncertainty principle limits what you can simultaneously measure on a single system.
A: You are assuming that the two beams of electrons are two different systems in identical quantum states. The uncertainty principle limits measurement of two non-commuting observables on one system, but says nothing about measurements on separate systems. If I had two identical systems in identical states, I could just measure $x$ in one system and $p_x$ in the other system which would give me an accurate measurement of $x$ and $p_x$ at the same time. There is no need to go through the complicated process you have described.
A: 
Then, adding the results of the measurements we have $(x+y)+(x−y)=2x$ and then $(p_x−p_y)+(p_x−p_y)=2p_x$.

Not quite, there are two problems with this. The first problem is that, since there are two electrons, there need to be two sets of position and momentum operators, so the $x$ in the first term is different from the $x$ in the second term.
The second problem is that you're being sloppy about the distinction between the operators and eigenvalues. For instance, in the first case, you don't actually have $x$ and $y$ eigenvalues, since you didn't measure $\hat x$ and $\hat y$; you only measured $\hat x+\hat y$ (I use hats to denote operators). As such, you can't actually break up $(x+y)$ into $x+y$. For this reason, it makes more sense define new operators, based on the rotation and scaling mentioned by J. Murray, $\hat u_i=\hat x_i+\hat y_i,\hat v_i=\hat x_i-\hat y_i$, and similarly for momentum (the subscripts denote the two sets of operators for the two particles).
Given this, the values you have measured are $u_1$, $p_{v1}$, $v_2$ and $p_{u2}$. Since all four of the corresponding operators commute, there is no inconsistency here.
A: Let me try to rephrase what all the other answers are trying to say.
Consider that the initial state is such that each (x,y) is equally likely within a square of unit length. What this means is that within that square each point is equally likely and outside it there is zero probability of detection. You can choose any state that you like, it will not affect the arguments that follow.
Now let us consider the two measurements we make; one of $\hat x + \hat y$ and another one of $\hat x - \hat y$. After you measure the first, your state localises to a point (p1) within the unit square. But here’s the thing, when you measure the second, the state localises to another point (p2) which more often than not is not the same as p1. 
Now do you see why it makes no sense to add the two measurements and call it a single measurement? The second measurement is independent of the first, so combining them is meaningless. It is more apparent when we label our measurement operators properly. $\hat x_1 + \hat y_1$ and $\hat x_2 + \hat y_2$.
If you repeat this set of measurements infinite times, you’ll fill up the square (complete information of initial state). But each subsequent measurement has no correlation with the previous one.
A: 
Then, adding the results of the measurements we have $(x+y)+(x−y)=2x$
and then $(px−py)+(px−py)=2px$.

This is the problem. You've measured $x+y$ on the first beam and $x-y$ on the second beam. These two quantities are not really related. You could write
$$
(x_1+y_1)-(x_2-y_2) 
$$
But we don't have $x_1=x_2$ or $y_1=y_2$, so you can't conclude anything interesting about the position or momenta of the individual beams.
That said, this idea has been explored in the cavity optodynamics literature: Møller et. al. "Quantum back action evading measurement of motion
in a negative mass reference frame" (2017). Mytakeaway is that yes, when you have more than 1 system with position and momentum you can find linear combinations of their position and momenta which commute allowing for simultaneous measurement of those linear combinations. However, you are not getting full information about any particular subsystem in this case, so the usual constraints imposed by quantum mechanics are still valid.
