This is allusion, though the difference in relationships to the future actor in both quotes is poetically different, an allusion usually, but not always, requires the reader to have knowledge of the work. For example, if I said that someone who was throwing insults like a champ was "Saltier than Lot's Wife" this is a biblical allusion and would require you to know a specific passage of the Bible (The tale of Sodamn and Gramorah) and the fate of Lot's Wife at the end of the tale (she was turned into a pillar of salt) to understand, though the line is refering to a different definition of "salty" that is more in vogue in modern language and not biblical translations of ancient languages.
Having recently binged season nine of Archer (Danger Island) which sets the entire cast in the pulp era south pacific (in 1937) there's an early reference where Archer says the phrase "Catch-22" only for Pam to point out that "that hasn't happened yet". THe joke is that while modern audiences instantly know the situation, the characters in the setting really shouldn't because the book being alluded too not only didn't come out several years later, the book's setting was during World War II which the speaker could have no knowledge about. Later the characters seem to set up the same gag by making a reference to the "Hobbit" and another character being absolutely lost, only for the group to suddenly realize the confused guy had been cut off from modern society for 4 years and the book is only a year old in the episode's time line, though the cast acts like this is a major pop culture phenomena that the movies (one year removed from the publication of the season) would have been (There is a plausible reason for both as the season is supposed to take place in the dream of Archer, who is in a Coma in the "real world" of the show, so he would have the pop culture references down and the savy to know he really shouldn't at the point of history he's supposed to be in.).