This is from Hartshrone exercise 6.6 part (a).
Let $A$ be a regular local ring and $M$ be a finitely generated $A$-module, prove the following
$M$ is projective $\iff$ $\operatorname{Ext}^{i}(M,A)=\{0\}$ for all $i>0$
The hint is to use the following
Proposition (6.11 A) If $A$ is a regular local ring, then
(1) for every $M$, pd$(M)\le \dim(A)$ where pd(M) is the projective dimension and dim(A) is the Krull dimension
(2) If $K=A/m$ then $\operatorname{pd}(K)=\dim(A)$
and to use the descending induction to prove that $\operatorname{Ext}^i(M,N)=\{0\}$ for all $i>0$ and all finitely generated $A$-module $N$. Then finally show that $M$ is a direct summand of a free module.
I really don't know how to put together all this information. Any help is appreciated