One way would be to look at the disc case or disc, it should say on them. Also I believe the cd and dvd media are different colors underneath.
PS2 CD media is purple in color on the bottom. DVD media will usually be silver in color. DVD9 media is harder to spot. My Xenosaga is goldish in color but I'm not sure if all DVD9 discs are that way.