I can answer it - sort of. Duolingo is a bit finnicky about these sorts of things. Yes, they basically mean the same thing, but Duolingo isn't trying to teach you to get the gist of Spanish, it wants you to translate as directly as possible. Not only that, but there is sort of a slight difference. When someone says "these weapons are legal," the point of the statement is to distinguish the weapons from illegal weapons by saying that they are legal. When someone says "these are legal weapons," the point of the statement is more to identify "these things" as weapons, which also happen to be legal. I suppose "these are legal weapons" can also be used to distinguish the weapons from illegal weapons, but it seems to me that "these weapons are legal" presupposes "these things" to be weapons (meaning that everyone knows what you're looking at are weapons - if it helps, think about it in a spy movie context; if you have a pen that actually functions as a gun, and someone said "these weapons are legal," referring to the pens, you'd think it was a bit strange to say it like that). Sorry for the long-winded explanation.
Alternatively, "legal" is used two different ways in those sentences. In "these weapons are legal," note that "legal" is actually a predicate adjective, whereas in "these are legal weapons," we have "legal" as a normal adjective. For reference, I found this little thing by googling: "A predicate adjective is an adjective that follows a linking verb and modifies (i.e., refers back to) the subject of the linking verb. A predicate adjective contrasts with an attributive adjective, which typically sits immediately before the noun it modifies." I guess in "these are legal weapons," it's actually an attributive adjective, but those are technically distinct parts of speech.