According to various references I have the 417A and 5842 are equivalent and interchangeable. And your description of the markings would seem to indicate that the two tubes were manufactured by Western Electric, although 5842s were made by several manufacturers. In any event, the tubes should certainly function properly assuming they are not weak or defective. And it could be that WE marked 417A tubes without the 5842 designation if they were manufactured before whenever the 5842 designation came into being (under which other manufacturers produced a 417A equivalent), and marked both designations subsequently.
Regards,
-- Al
Regards,
-- Al