The n-th term of an A.P. is given by the formula:
\[
a_n = a_1 + (n - 1) \cdot d,
\]
where \( a_1 \) is the first term and \( d \) is the common difference.
For the A.P. \( 5, 12, 19, \dots \), the first term is \( a_1 = 5 \) and the common difference is \( d = 12 - 5 = 7 \).
Now, calculate \( a_{40} \) and \( a_{35} \):
\[
a_{40} = 5 + (40 - 1) \cdot 7 = 5 + 39 \cdot 7 = 5 + 273 = 278,
\]
\[
a_{35} = 5 + (35 - 1) \cdot 7 = 5 + 34 \cdot 7 = 5 + 238 = 243.
\]
Thus:
\[
a_{40} - a_{35} = 278 - 243 = 35.
\]
Thus, \( \boxed{35} \).