I am confused how to use (or if it is even possible) to use existential instantiation and universal generalization in a proof. How would I solve the following proof and would I need these rules?

Premise 1: for all x in D [ P(x) -> Q(x) ]

Premise 2: for all x in D [ not P(x) -> R(x) ]

Premise 3: there exists an x in D [ not Q(x) ]

Solution: there exists an x in D [ R(x) ]

Any help is appreciated. Thanks.