First, prefer using a lens hood than a UV filter. You should not need a filter unless in the presence of salt water splashing, flying sand or similar.

Second, a lens hood must match the lens, not just to account for its size but also its optical design. An 18-55mm and a 55-200mm may have the same diameter for the hood-mounting bayonet but a hood for the 55-200mm will severely impair an 18-55mm lens. You need to find the exact part numbers from Nikon.

For the filter thread, things are simpler. Both those lens support 52mm filters. In general though, it is highly recommended to get a larger more universal size and use step-up-rings. That way you don't need to buy new filters each time you get a larger lenses. Now, it seems 82mm is a safe choice but I use 77mm and 62mm as universal sizes for mid-size and small lenses, respectively.

Lens caps should match the thread since you need one for each lens anyways. So 52mm. Those are *almost* universal, so there are third-party ones which can be had for cheap.