Use total 100Mohm resistor(99.8 % / 0.2%) so the current will reduce to 2.mA it is very less power dissipation.
Do not use buck converter because you cant get buck output voltage variation with input (Output voltage fixed)
In addition to what others are saying, the high side resistor divider will be subjected to 2495 volt!
There are some high voltage resistor dividers but they are very expensive. Normal 1/4 watt axial lead resistors cannot withstand more than 250 volt....I would play it safe and have no resistor withstanding more than 200 volt.
Therefore the upper resistor leg has to be made of many series-connected individual resistors.
Thus 2500v/200v = 12. 5 resistors. Make it a round number and use 13. Or more.
You may want to conformal-coat the whole assembly to prevent leakage due to humidity.
However, since the OP asked such a basic question as a voltage divider, the most likely scenario is that he/she is not aware of the voltage limitations of common resistors, which he/she would most likely select.
Thus my recommendation: if the OP is not aware of the danger of 2500V, the needed careful design, the voltage ratings of parts, safety creepage distance, safety air gaps and all this safety stuff ..... he should not design such HV circuits.
2500VDC and say 10M ohm is 0.625 watt, for 600v rated resistors this is 5 resistors at 2.0 Meg each, ( 250uA, 0.125W each diss - so 2W R's)
5V at 250uA is 20k ohm (0.2% error) the input Z of the op-amp should be at least 1M ohm to keep the error low ( 20k ohm source )
So as long as your 2500V source can supply 250uA without problem - things look easy - remember to keep plenty of spacing on the HV resistor string.
You need 0.1% R's on the HVDC if you want real accuracy, else you can use 1% and use a stable pot (50k with 47k R in //) to set the 5V signal from the 2500V source ...