Is there a name for the relationship between two unconnected hypothetical arguments?

If the relationship you're looking for is that the impossibility of A is illustrated by mentioning an impossible thing B (and C), then the rhetorical device is known as an adynaton. (A phrase frequently used as example is "when pigs fly"; there are other idioms of impossiblity like "until hell freezes over".)

"I will sooner have a beard grow in the palm of my hand than he shall get one of his cheek." — Shakespeare, Henry IV, Part 2

In the "How do you solve a problem like Maria" case, the relationship is not explicitly made with a connective like "when" or "only if", but the rhetorical device is still an adynaton. The structure — all sentences begin with "How do you [verb]" — that implicitly makes the connection clear is simply parallelism.


These statements constitute a rhetorical device expressing the impossibility of a task. In a sense they are non sequiturs, but in actuality they are repetitive statements of absurdity, which taken together underscore the impossibility of the original query.


By "unconnected", I guess you mean that they're not joined into a single statement, such as:

To solve a problem like Maria is like catching a wave upon the sand.

Or:

To solve a problem like Maria is to catch a wave upon the sand.

Because the lyrics are in verse, there is some room for interpretation, but I'd say it's just an ordinary metaphor. It's a comparison between Maria and various supposedly impossible things to describe the impossibility that she represents, and that's basically the textbook definition of a metaphor: describing one thing in terms of another.