Unfortunately the first sentence is not correct. 'In-depth' is an adjective, so it must always be followed by a separate noun. Here is how your sentence would work correctly with 'in-depth':
'This is an in-depth explanation of the problem'
'This explanation offers an in-depth analysis of the problem.'
Here, in both sentences 'in-depth' comes before a noun.
If you are looking for a good noun the 'insight' is a good option. It is always 'an insight into something'. With this you can keep your sentence the same:
'The explanation offers an insight into the problem'
With the second sentence, everything works, you just need to change the preposition to 'on':
'This explanation throws some light on the question.'
Hope this helps!