The correct answer is: had been discussing.
Explanation:
The sentence describes an action that started in the past, continued for some time, and finished before another action in the past (I came). Therefore, the Past Perfect Continuous tense is the most appropriate choice.
Translation: Они обсуждали эту проблему в течение получаса до моего прихода.