Let $P$ be a function defined by $P(t)=a^t+b^t$, where $a$ and $b$ are complex numbers.  If $P(1)=7$ and $P(3)=28$, compute $P(2)$.

[i] Proposed by Justin Stevens [/i]
1. Given the function \( P(t) = a^t + b^t \), we know:
   \[
   P(1) = a + b = 7
   \]
   and
   \[
   P(3) = a^3 + b^3 = 28.
   \]

2. We start by cubing the first equation \( P(1) = a + b = 7 \):
   \[
   (a + b)^3 = 7^3 = 343.
   \]
   Expanding the left-hand side using the binomial theorem, we get:
   \[
   a^3 + 3a^2b + 3ab^2 + b^3 = 343.
   \]

3. We know from the problem statement that \( a^3 + b^3 = 28 \). Substituting this into the expanded equation, we have:
   \[
   28 + 3ab(a + b) = 343.
   \]

4. Since \( a + b = 7 \), we substitute this into the equation:
   \[
   28 + 3ab \cdot 7 = 343.
   \]

5. Simplifying, we get:
   \[
   28 + 21ab = 343.
   \]

6. Solving for \( ab \), we subtract 28 from both sides:
   \[
   21ab = 315.
   \]
   Dividing both sides by 21, we find:
   \[
   ab = 15.
   \]

7. Next, we square the first equation \( P(1) = a + b = 7 \):
   \[
   (a + b)^2 = 7^2 = 49.
   \]
   Expanding the left-hand side, we get:
   \[
   a^2 + 2ab + b^2 = 49.
   \]

8. We know \( ab = 15 \), so substituting this into the equation, we have:
   \[
   a^2 + 2 \cdot 15 + b^2 = 49.
   \]

9. Simplifying, we get:
   \[
   a^2 + b^2 + 30 = 49.
   \]

10. Solving for \( a^2 + b^2 \), we subtract 30 from both sides:
    \[
    a^2 + b^2 = 19.
    \]

11. Therefore, \( P(2) = a^2 + b^2 = 19 \).

The final answer is \( \boxed{19} \).