Let Peter's age be \( P \) and his brother's age be \( B \).
From condition I: Peter's age is 3 times his brother's age.
This gives the equation:
\[
P = 3B
\]
From condition II: The sum of their ages is 40 years.
\[
P + B = 40
\]
Now, substitute \( P = 3B \) into the second equation:
\[
3B + B = 40
\]
\[
4B = 40
\]
\[
B = 10
\]
Now that we know the brother’s age is 10 years, substitute this back into \( P = 3B \) to find Peter's age:
\[
P = 3 \times 10 = 30
\]
The age difference between Peter and his brother is:
\[
P - B = 30 - 10 = 20
\]
Thus, the age difference between Peter and his brother is \( \boxed{20} \) years.
Therefore, the correct answer is \( \boxed{3} \).