I am writing this answer after spending some time on this as a qft novice. I hope to receive comments and corrections because I am learning as well. I believe the expression you have written down in the end is just one of those which make up the first-order term in the expansion of the S-matrix element. The first-order matrix element is: $$S=\langle p_3 p_4|T\left(-i\frac{\lambda}{4!}\int d^4x\phi^4(x) \right)|p_1p_2\rangle$$ Note that $T$ here is the time ordering operator. Wick's theorem tells you that $T(\phi^4)=N(\phi^4+$all possible contractions$)$. N is the normal ordering operator, which basically asks you to rearrange whatever lives inside the parenthesis so that all creation operators go on the left and all annhilation operators go on the right. To reach this goal, you will have to take commutation rules into account. For example, let's take a term from what I called "all possible contractions" under the normal ordering operator N. I fancy the term $\bar{\phi\phi}\phi\phi$, where the first two fields are contracted (and merrily get out of the way as propagators, they aren't operators anymore). The normal ordering op. acts on the other two: $$N(\phi\phi)=N\left(\int\frac{d^3p}{(2\pi)^3\sqrt{2E_p}}\int\frac{d^3k}{(2\pi)^3\sqrt{2E_k}}(a_pe^{-ipx}+a_p^+e^{ipx})(a_ke^{-ikx}+a_k^+e^{ikx})\right)$$
Let's normal-order the term under the integral sign:
$$N\left((a_pe^{-ipx}+a_p^+e^{ipx})(a_ke^{-ikx}+a_k^+e^{ikx})\right)=N\left(a_pa_ke^{-ipx}e^{-ikx}+a_pa_k^+e^{-ipx}e^{ikx}+a_p^+a_ke^{ipx}e^{-ikx}+a_p^+a_k^+e^{ipx}e^{ikx}\right)=\left(a_pa_ke^{-ipx}e^{-ikx}+a_k^+a_pe^{-ipx}e^{ikx}+(2\pi)^3\delta^{(3)}(k-p)e^{-ipx}e^{ikx}+a_p^+a_ke^{ipx}e^{-ikx}+a_p^+a_k^+e^{ipx}e^{ikx}\right)$$
See? It's normal ordered because whenever there are a creation and an annhilation operator in the same summand, the annihilation is pushed to the right and the creation to the left.
With some patience you can show that the only terms contributing to the matrix element are those in which the number of creation operators is equal to that of annihilation operators; in our case, the second and the third term only. You can show it by moving around the operators considering also those involved in the definition of single particle states. The term we are dealing with has become: $$\langle p_3p_4|\left(-i\frac{\lambda}{4!}\int d^4x\int\frac{d^3p}{(2\pi)^3\sqrt{2E_p}}\int\frac{d^3k}{(2\pi)^3\sqrt{2E_k}}\left(a_k^+a_pe^{i(k-p)x}+a_p^+a_ke^{i(p-k)x}\right)\right)|p_1p_2\rangle$$ Let's play a little bit with the $a,a^+$ operators coming from the fields $\phi$ and from the definition of $|p\rangle$ states. To thin the math out, I will kill the terms with a creation (annihilation) operator on the left (right), because their action on $\langle 0|$ ($|0\rangle$) gives zero. Wherever I do this I put a $=^*$ sign. I will also drop the $(2\pi)^3$ factor of commutation relation and recover it in the end for the sake of clarity.
$$\require{cancel}
a_4a_3a_k^+a_pa_1^+a_2^+=\\
a_4a_k^+a_3a_pa_1^+a_2^++a_4\delta^{(3)}(k-p_3)a_pa_1^+a_2^+=\\
\cancel{a_k^+a_4a_3a_pa_1^+a_2^+}+\delta^{(3)}(k-p_4)a_3a_pa_1^+a_2^+ +a_4\delta^{(3)}(k-p_3)a_1^+a_pa_2^+ +a_4\delta^{(3)}(k-p_3)\delta^{(3)}(p-p_1)a_2^+=^*\\
\delta^{(3)}(k-p_4)a_3a_1^+a_pa_2^+ +\delta^{(3)}(k-p_4)a_3\delta^{(3)}(p-p_1)a_2^+ +\cancel{a_1^+a_4\delta^{(3)}(k-p_3)a_pa_2^+}+\delta^{(3)}(p_1-p_4)\delta^{(3)}(k-p_3)a_pa_2^+ +\cancel{\delta^{(3)}(k-p_3)\delta^{(3)}(p-p_1)a_2^+a_4} +\delta^{(3)}(k-p_3)\delta^{(3)}(p-p_1)\delta^{(3)}(p_2-p_4)=^*\\
(2\pi)^9\left[\delta^{(3)}(k-p_4)\delta^{(3)}(p_3-p_1)\delta^{(3)}(p_2-p)+\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_1)\delta^{(3)}(p_2-p_3)+\delta^{(3)}(p_1-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_2-p)+\delta^{(3)}(k-p_3)\delta^{(3)}(p-p_1)\delta^{(3)}(p_2-p_4)\right]$$
To these four we need to add other four in which $p$ and $k$ switch roles.
Let's pick one of these delta terms and put it inside the integral to see what it yields, together with its counterpart in which $p$ and $k$ are switched. I'll pick the first one: $$\langle 0|\sqrt{4E_3E_4}\left(-i\frac{\lambda}{4!}\int d^4x\int\frac{d^3p}{(2\pi)^3\sqrt{2E_p}}\int\frac{d^3k}{(2\pi)^3\sqrt{2E_k}}(2\pi)^9\left[\delta^{(3)}(k-p_4)\delta^{(3)}(p_3-p_1)\delta^{(3)}(p_2-p)e^{i(k-p)x}+\delta^{(3)}(p-p_4)\delta^{(3)}(p_3-p_1)\delta^{(3)}(p_2-k)e^{i(p-k)x}\right]\right)\sqrt{4E_1E_2}|0\rangle=\\
(-i\frac{\lambda}{4!})(2\pi)^3\int d^4x\left[\sqrt{4E_3E_1}\delta^{(3)}(p_3-p_1)e^{i(p_4-p_2)x}+\sqrt{4E_3E_2}\delta^{(3)}(p_3-p_1)e^{i(p_4-p_2)x}\right]$$ Now take the integral over $x$ and see what happens: $$(-i\frac{\lambda}{4!})(2\pi)^7\left[\sqrt{4E_3E_1}\delta^{(3)}(p_3-p_1)\delta^{(4)}(p_4-p_2)+\sqrt{4E_3E_2}\delta^{(3)}(p_3-p_1)\delta^{(4)}(p_4-p_2)\right]$$
This is the final result but only for the partially contracted term. As you can see it will be a sum of four deltas which represent uninteresting processes: $p_1$ goes unaltered into $p_3$, $p_2$ into $p_4$ etc. These processes are represented on page 111 of Peskin and look like this (don't forget the propagator coming from the first two contracted $\phi$):
What about the operation of contracting an operator $\phi$ with an external state?
It should now be easy for you to see that the result we got to could have been obtained in an easier way if we assumed the following equalities to hold:
So that, for example, one term could have been derived as follows:
The four terms with deltas are uninteresting ones: they describe processes in which no actual scattering occurs, since each entering particle exits unaltered. The interesting process is the one that comes out of the uncontracted term: $$\langle p_3 p_4|T\left(-i\frac{\lambda}{4!}\int d^4xN(\phi^4(x)) \right)|p_1p_2\rangle$$ Just like in the above case, only the normal ordered terms with an equal number of creation and annihilation operators will give non-zero contributions. I'll write them down (neglecting the integrals and the exponentials that come with them in the definition of $\phi(x)$ ): $$N(a_p a_k a_q^+ a_r^+ + a_p a_k^+ a_q a_r^+ +a_p a_k^+ a_r^+ a_q + a_p^+ a_k^+ a_q a_r + a_p^+a_k a_q a_r^+ +a_p^+ a_k a_q^+ a_r)$$
Let's follow the destiny of the term that's already normal ordered for the sake of brevity: $a_p^+a_k^+a_qa_r$. Recovering integrals and exponentials, this would be $\langle p_3p_4|\int\frac{d^3p}{(2\pi)^3\sqrt{2E_p}}\int\frac{d^3k}{(2\pi)^3\sqrt{2E_k}}\int\frac{d^3q}{(2\pi)^3\sqrt{2E_q}}\int\frac{d^3r}{(2\pi)^3\sqrt{2E_r}}a_p^+a_k^+a_qa_re^{i(p+k-q-r)x}|p_1p_2\rangle$. Dropping again integrals and exponentials, let's focus on creation and annihilation operators and rearrange them in an useful way.
If you have come down here I guess you will be sweating like I am; to thin out calculations, I will remove all terms ending with an annihilation operator or beginning with a creation operator. Their action on $|0\rangle$ and $\langle 0|$, respectively, will yield zero. Wherever i put $=^*$ it means I have killed one or more of these terms. I will also drop the $(2\pi)^3$ and recover it in the end. So:
$$\require{cancel} a_4a_3a_p^+a_k^+a_qa_ra_1^+a_2^+=\\a_4a_p^+a_3a_k^+a_qa_ra_1^+a_2^++a_4\delta^{(3)}(p-p_3)a_k^+a_qa_ra_1^+a_2^+
=\\
\cancel{a_p^+a_4a_3a_k^+a_qa_ra_1^+a_2^+} +\delta^{(3)}(p-p_4)a_3a_k^+a_qa_ra_1^+a_2^+ +\cancel{a_k^+a_4\delta^{(3)}(p-p_3)a_qa_ra_1^+a_2^+} +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)a_qa_ra_1^+a_2^+
=^*\\
\cancel{a_k^+a_3\delta^{(3)}(p-p_4)a_qa_ra_1^+a_2^+} +\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)a_qa_ra_1^+a_2^+ +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)a_qa_1^+a_ra_2^+ +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)a_q\delta^{(3)}(r-p_1)a_2^+
=^*\\
\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)a_qa_1^+a_ra_2^+ +\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)a_q\delta^{(3)}(p_1-r)a_2^+ +\cancel{\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)a_1^+a_qa_ra_2^+} +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(p_1-q)a_ra_2^+ + \cancel{\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(r-p_1)a_2^+a_q} +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(r-p_1)\delta^{3}(p_2-q)
=^*\\
\cancel{\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)a_1^+a_qa_ra_2^+} +\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-q)a_ra_2^+ +\cancel{\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-r)a_2^+a_q}+\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-r)\delta^{(3)}(p_2-q) + \cancel{\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(p_1-q)a_2^+a_r} +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(p_1-q)\delta^{(3)}(p_2-r) +\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(r-p_1)\delta^{3}(p_2-q)
$$
We are left with the sum of four deltas, just like before:$$
(2\pi)^{12}\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-q)\delta^{(3)}(r-p_2) +(2\pi)^{12}\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-r)\delta^{(3)}(p_2-q) +(2\pi)^{12}\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(p_1-q)\delta^{(3)}(p_2-r) +(2\pi)^{12}\delta^{(3)}(k-p_4)\delta^{(3)}(p-p_3)\delta^{(3)}(r-p_1)\delta^{3}(p_2-q)
$$
We are ready to recover the integrals. Just pop each of these deltas inside them. I'll pop just the first one for brevity:
$$\sqrt{4E_3E_4}\int\frac{d^3p}{(2\pi)^3\sqrt{2E_p}}\int\frac{d^3k}{(2\pi)^3\sqrt{2E_k}}\int\frac{d^3q}{(2\pi)^3\sqrt{2E_q}}\int\frac{d^3r}{(2\pi)^3\sqrt{2E_r}}e^{i(p+k-q-r)x}(2\pi)^{12}\delta^{(3)}(p-p_4)\delta^{(3)}(k-p_3)\delta^{(3)}(p_1-q)\delta^{(3)}(r-p_2)\sqrt{4E_1E_2} =\\
e^{-i(p_1+p_2-p_3-p_4)x}$$
Integrating over $d^4x$ we get a $(2\pi)^4\delta^{(4)}(p_1+p_2-p_3-p_4)$. Compare this to the result shown at page 112 of Peskin: You could have obtained this much faster if you had assumed that you could "contract" each of the four fields with initial states, as done before, immediately writing down the exponentials according to the rules:
There are 4! possible ways to carry out these contractions: these correspond to the 4 deltas you get from each of the 6 terms of $N(\phi^4)$ having equal numbers of $a$s and $a^+$s.