How many the number of the vectors for given this linear transformation? Here is the my lecturer's question given to our class
$Q)$ Say Linear transforamtion, $T : P_3(\mathbb{R}) \to \mathbb{R}^4$ by $T(f(x)) = (f(a_1),f(a_2),f(a_3),f(a_4))$
Here $f(x) \in P_3(\mathbb R)$ (The set  $P_3(\mathbb R)$ is a set of the polynomials, $f$ whose $deg f \leq 3$ and coefficients of the $f$ in $\mathbb{R}$ )
Find the number of the $a = (a_1, a_2, a_3, a_4) (\in X^4)$ satisfying the $rank(T) =2$ for $X = \{1,2,3,4,5\}$

Let me introduce my attempt
Since  $P_3(\mathbb R) = \langle 1,x,x^2,x^3 \rangle$(Basis of the $P_3(\mathbb R)$)
Then $[T] = [T(1) \vert  T(x) \vert T(x^2) \vert T(x^3)]$ would like the below.
$$  \begin{pmatrix}
    1 & a_1 & a_1^2 & a_1^3 \\
    1 & a_2 & a_2^2 & a_2^3\\
    1 & a_3 & a_3^2 & a_3^3\\
    1 & a_4 & a_4^2 & a_4^3
    \end{pmatrix} $$
Therefore To be $rank(T) =2$, $\vert \{ a_1, a_2, a_3, a_4 \} \vert =2$ 
If we divide the case becoming $\vert \{ a_1, a_2, a_3, a_4 \} \vert =2$, there are 2 cases. (Surely the value of the $a_i $should be in $\{1,2,3,4,5\}$)
First, three elements have a equal values and the other one is different. 
Hence, $5 \bullet {4\choose 3} + 4\bullet{4\choose 1}= 36 $
Second, Each of the two elements have a equal values, respectively.
Hence, $5 \bullet {4\choose 2} + 4\bullet{2\choose 2}= 34 $
The answer is $70$.
But in my lecture's book he said answer of that is 392. I can't totally understand why that answer comes out. At least I believe, He's answer is incorrect. 
Is my answer is right?
Any answer would be appreciated.
 A: The idea to count is correct but there are some mistakes in your computations. However I think the book is also wrong.
Let's look at yours computations:
In the first one you have: $5\cdot\binom{4}{3} \cdot 4 \cdot \binom{1}{1} = 80$ and this is because the choice of the second number is indipendent (so you have to multiply) and the binomial is just $\binom{1}{1}$ because you have already chosen three elements.
In the second you have: $\dfrac{5\cdot\binom{4}{2} \cdot 4 \cdot \binom{2}{2}}{2} = 60$ and again this is because you have to multiply in the center (independent choice) but you have to divide by $2$ because there is a ripetition (you count two times strings like this $(a_1,a_1,a_2,a_2)$ because you can switch $a_1$ with $a_2$.
So the correct anwer is $140$.
In order to convince you that this is the correct answer, I'll count all the string: the total number of the strings $(a_1,a_2,a_3,a_4)$ is $5^4=625$.
Rank $1$ strings. Choose $1$ number of the set $X$ and do anagrams of the string constituted by $1$ letter: $\binom{5}{1}\cdot \frac{4!}{4!} = 5$.
Rank $2$ strings. $140$ like you have done.
Rank $3$ strings. The unique possibility is a combination of $3$ number where one of them appears $2$ times. Using your method we have $5\cdot \binom{4}{2}\cdot \frac{4\cdot \binom{2}{1} \cdot 3\cdot \binom{1}{1}}{2} = 360$.
Rank $4$ strings. All the numbers of the string are different so you have $5\cdot 4\cdot 3\cdot 2 = 120$.
Hence $5+140+360+120 = 625$.
