Q:

If another question is the answer, is it a duplicate?

The question Why split the <script> tag when writing it with document.write()? takes a solution and asks what problem is is solving.
The question Script tag in JavaScript string takes that problem and looks for a solution.
The latter has been marked as a duplicate of the former, despite the fact that they are asking the opposite thing. It is, however, possible to infer the answer to the former from the latter.
Are they still duplicates?

Now if we take a step back and look at Want to load javascript only on mobile devices. 
This question is focused on the broader picture and doesn't show that the OP has identified that the </script> is the cause of the problem. The second question is a closer duplicate of the third than the first.
Should the third be marked as a duplicate of either of them?

A:

OK to be duplicate.
Duplicate serves two purposes:

points to an existing answer to the given question (should be close enough for regular programmer to understand)
improve search by keeping alternative interpretations of the question for search purposes but linking to "canonical" answer.

The current duplicate thread (as combination of question and answer) definitely provides an answer for original question. Are there better duplicates - most likely, but unless you know real canonical answer it is not really worth spending a lot of time searching for slightly better one. 

A:

I see the two questions as different. One is:

Why is x done?

with an answer of:

To solve y problem

The other is:

How do I solve y problem?

the answer of course is:

Do x

Someone searching for "Why is x done?" isn't going to find the "How do I solve y problem?" question, and the answers won't be geared toward the question being asked.
Someone searching for "How do I solve y problem?" isn't going to find "Why is x done?", and again, the answers won't be geared toward the question being asked.
Are they related? Absolutely. Should they be linked? very likely. Are they exact duplicates? No.

