[itex]P_2[/itex] denotes the space of second-order polynomials. All you need to test this condition is to come up with a third "vector" (another second-order polynomial) that you can plug in as w.
This condition you're testing is the distributive property. It's the same thing as saying that (5+10)x6 = 5x6 + 10x6. I can plug in any three numbers there instead of 5, 10, and 6 and it works because the real line is a (very simple) vector space of sorts.
What you do to test this is simple. If I want to test the distributive property on real numbers, I go to what I just wrote and say, hm, is (5+10)x6 -> 15x6 really equal to 5x6 + 10x6?
At that point, you just evaluate both sides until you get something that's obviously (un)equal.