Cable loss is specified per meter, so the short bit of RG58 won't degrade the performance of the RG213 section.
Some back-of-the-envelope calculations:
Loss in 5 meters of RG58: 1.5dB
Loss in 30cm of RG58: 0.1dB
Loss in 4.7 meters of RG213: 0.7dB
Loss in PL259/SO239 @477MHz: ~0.6dB
So in the original situation:
5 meters of RG58 = 1.5dB loss
In your 'upgrade':
30cm RG58
PL259
SO239
4.7m RG213
Total = 2dB
So, for a run of 5m it seems that the overall loss will be greater using the parts in your example. Obviously the longer the cable run, the greater the advantage of replacing the cable.
PL259/SO239 connectors are reaching the limits of their abilities (regarding reasonable loss) once you approach 500MHz - you'd get much better results switching to N connectors at that frequency. The graphs below show the loss of two PL259 connections being >1dB, while the loss from two N connectors is barely noticeable:

Source:
http://www.qsl.net/vk3jeg/pl259tst.htmlAndy