Minimum vertices to cover other vertices with max weight [duplicate]

This question already has an answer here:

I have a problem where I'm given the input of a graph. The output would be a set of vertices such that I have the minimum number of vertices to cover other vertices and if there is more than one option then then I'd have to choose the maximum weighted vertex set. I'm trying to approach this in a Dynamic programming though I've always come at a dead end. I'm trying to maximize the number of vertices weights yet at the same time Im trying to minimize the number of vertices selected. In this case the potential answers can be

{A,B} = 10

{A,C} = 9

{C,D} = 9

{D,B} = 10

Since {D,B} and {A,B} have equal weights then either is a correct solution.

I'm pretty confident that I should be memorizing the weights sum though everything else I've tried led to a dead end. Can anyone provide insights?

This is not a vertex cover problem. To be honest Im not really sure what my recurrence relation is. I tried thinking about the problem in such a way that I already have a an optimal solution of a graph G and I want to add more more vertex. The problem is I can add another vertex that may have a lower weight than what the G has in optimal solution, but this new vertex covers all other vertices so I'd have to choose it anyway. The "maximization" constraint fails with respect to previous input as I'm now tackling the other constraint on the problem.