The will probably work, and for $25 why not try. The only thing I would say is to take the socket off the ballast. The ballast with jsut generate extra heat in your grow room that is not needed. Plus you will be able to put them in a better reflector, cause those are garbage.
If they are 250 like Growman said, I would suggest using both for flower, or using a really small cab with short plants that finish about 12" tall. THey do look a little small to be 400watts, but that could just be the pic. You should be able to open the housing and see what it says on there. THen you will know for sure.
You can also get ballast kits online for fairly cheap. I got my 600watt HPS for like $100. You can get 400watt ones for like $60 I think. Check out HTG Supply. They have good prices on their ballasts, and the kits have worked great for me the past 3yrs.