Okay..since they said that the elements are not inserted one by one so we can think like all the elements are added together.
Heap uses array data structure right..so append those m elements after n elements.
Now total size of heap is m+n. Apply build heap on it.
You answer would have been correct if the elements were added one by one.