I purchased my 08 DS450X at Mt Hood Polaris new left over for something like 5600 bucks out the door 8 months ago. Since then I have thrown sand tires, a +6 swingarm, and 6 VisionX LED lights on it.
I was looking at the same situation as you are last June. I went with the new bike for a little more money then buying a used bike. The X model is a must have for the DS450.
I would get the 3900 can-am over the 5500 YZF. Both are great bikes, but the can-am you could have the swingarm, tires, and lights and have the perfect dune/trail bike for less then the YZF. Plus the Can-am will be quicker