お聞きしたら uses the humble お + verb-stem + する pattern for 'I humbly asked.' The response 自分で調べなさい 'look it up yourself' uses the mild imperative なさい — the contrast between the polite question and the curt reply creates humor. 言われてしまいました adds regret at being rebuffed.