Conjugated word + んだ vs nonconjugated word + conjugated んだ?
Suppose I have a verb/adjective/noun, let's say 無理, and I add (な)んだ to it as an explanatory sentence-ending particle. What would be the difference in nuance between the following two conjugated constructions? 1. それは無理だったんだ。 2. それは無理なんだった。 More generally, what is the difference in meaning between conjugating a word before adding んだ (to any tense, such as past negative) and doing it the other way around? Please also provide examples where one would be more appropriate than the other for each of the two cases, and consider what would happen if ん were replaced by の.