Determine all polynomials $P$ with real coefficients satisfying the following condition: whenever $x$ and $y$ are real numbers such that $P(x)$ and $P(y)$ are both rational, so is $P(x + y)$.
To determine all polynomials \( P \) with real coefficients that satisfy the condition: whenever \( x \) and \( y \) are real numbers such that \( P(x) \) and \( P(y) \) are both rational, then \( P(x + y) \) is also rational, we proceed as follows:

1. **Identify Trivial Solutions:**
   - Constant polynomials \( P(x) = c \) where \( c \in \mathbb{Q} \) clearly satisfy the condition because \( P(x) \) is always rational.
   - Linear polynomials \( P(x) = ax + b \) where \( a, b \in \mathbb{Q} \) also satisfy the condition. If \( P(x) \) and \( P(y) \) are rational, then \( ax + b \) and \( ay + b \) are rational, implying \( a(x + y) + b \) is rational.

2. **Assume \( \deg(P) \geq 2 \):**
   - Suppose \( P \) is a polynomial of degree at least 2. We will show that this leads to a contradiction.
   - By the transformation \( x \rightarrow rx \) for some rational \( r \), we can assume without loss of generality that \( P(\mathbb{Z}) \subseteq \mathbb{Q} \). This implies \( P(\mathbb{Q}) \subseteq \mathbb{Q} \).

3. **Claim 1: If \( r \in \mathbb{R} \) such that \( P(r) \in \mathbb{Q} \), then \( r \in \mathbb{Q} \):**
   - Proof: Suppose \( P(r) \in \mathbb{Q} \) for some irrational \( r \). Consider \( P(mr + n) \) for integers \( m \) and \( n \). Since \( P \) is a polynomial with rational coefficients, \( P(mr + n) \) is a polynomial in \( r \) with rational coefficients. If \( P(mr + n) \) is rational for all integers \( m \) and \( n \), then \( r \) must be rational, contradicting our assumption that \( r \) is irrational. Hence, \( r \) must be rational. \(\blacksquare\)

4. **Claim 2: For any polynomial of degree greater than 1, there exists a non-rational real number \( c \) such that \( P(c) \) is rational:**
   - Proof: Consider the Rational Root Theorem (RRT). Choose a number \( \alpha \) such that \( P(\alpha) = \frac{\text{something}}{q} \) where \( q \) is coprime to all numerators and denominators of the coefficients of \( P \). If \( \alpha \) were rational, say \( \alpha = \frac{p}{q} \), then \( P(\alpha) \) would have a denominator divisible by \( q^2 \), leading to a contradiction. Hence, such a \( \alpha \) must be irrational. \(\blacksquare\)

5. **Conclusion:**
   - Since assuming \( \deg(P) \geq 2 \) leads to a contradiction, the only possible polynomials \( P \) that satisfy the given condition are those of degree at most 1.

The final answer is that \( \boxed{ P } \) must be a linear or constant polynomial with rational coefficients. Therefore, \( P(x) = ax + b \) where \( a, b \in \mathbb{Q} \).