If by INVENTOR you mean APPLICANT... It is simply first to file. If you filed a patent for someone else's work, that work has to be successfully applied as prior art to invalidate the patent. If the existing work isn't sufficiently documented by acceptable publication, it is difficult to use as prior art years later when the patent is first litigated.
All this changes is how it is handled when two or more inventors have overlapping inventions.