After noticing resemblance, keep three propositions distinct: Who composed first? Was one writer influenced by the other? and Which expression is rhetorically stronger?
The first is historical, the second concerns transmission or dependence, and the third is literary analysis of meaning, image and context. An answer to one does not automatically establish the others.
A later poem may be better crafted without any proven evidence that it borrowed from the earlier one. The analysis should not confuse comparison with attribution.