optimization: cover of vertex of minimum weight in $ G $ connected with cycles of maximum length $ 3 $

Leave $ G = (V, E) $ be a non-directed weight chart $ w: V rightarrow
(0, infty) $
. We want to find an algorithm that finds a vertex cover (that is, a set of vertices so that each edge contains an element of that set)
$ U $ from $ G $ minimizing the amount $$ w (U) = sum_ {u in U} w (u) $$ Dice
every single cycle in $ G $ It has a length of at most $ 3 $.

We are supposed to use the following fact: given an expansion tree $ T $ from $ G $, for all $ uv in E $, the length of the road in $ T $ since $ u $ to $ v $ it is $ 1 $ or $ 2 $.

I thought about using a more sophisticated version of the well-known greedy algorithm that finds a vertex cover for a tree without weights (in each iteration, find a leaf and eliminate its father, including all his children, marking the father). However, I could not generalize the underlying principles.