If a Ranger has dragons and humanoids chosen as their favored enemies, would they be able to benefit from this feature if tracking a druid (humanoid) while in Wild Shape (beast)?
No, not while they are shaped out of the favored enemy type
While in wild shape the Druid is considered a beast in all respects that are laid out in the rules for Wild Shape.
Your game statistics are replaced by the statistics of the beast [..]
This means that while wild shaped, the Druid is no longer a humanoid but is the type of the beast. So, the ranger would no longer get advantage on checks to track the Druid while in that form.