I want to show that "if $R$ is a commutative ring and $P$ is a projective $R$-module, then $R[t] \otimes_R P$ is also a projective $R[t]$-module where $R[t]$ is a polynomial ring."
I tried it but I'm not sure if I did it correctly. My attempt is below.

Thank you all.
${\bf Edit}$: From looking at some proof from Rotman's text, I modified it to make a much shorter argument.
Since $P$ is a projective $R$-module, we know $P$ is a direct summand of some free $R$-module i.e $\bigoplus_{i \in I} R \cong P \oplus N$. Since tensoring preserve direct sum, we have
$$ \bigoplus_{i \in I} R[t] \cong R[t] \otimes_R \big(\bigoplus_{i \in I} R\big) \cong (R[t] \otimes_R P) \oplus (R[t] \otimes_R N).$$
But this implies that $R[t] \otimes_R P$ is a projective $R[t]$-module.
Question: "I tried it but I'm not sure if I did it correctly. My attempt is below."
Answer: Note that if $\phi:A \rightarrow B$ is a map of unital commutative rings and if $P$ is a finite rank projective $A$-module with split surjection (split by $s$)
$$p: A^n \rightarrow P \rightarrow 0$$
you get canonically a split surjection $1\otimes p: B\otimes_A A^n \rightarrow B\otimes_A P \rightarrow 0$
split by $1\otimes s$. Hence $B\otimes_A P$ is a projective finite rank $B$-module.
Example: Your case follows with $B:=A[t]$.