Well, yes and no, no because I believe that the CD that ship with the computer are tied down to the TYPE of computer they are shipped with, but it probably wont hurt to try.
If you bought a version of OS X in a box from a store, then that pretty much will load onto anything compatible.