There Are Hundreds of Posts Here And On The Internet
Regarding dishwasher rack repair.
Rusting of dishwasher racks is a common problem and solved by one of two ways; replace or repair. The rust you are seeing is simply staining coming off the racks during dw cycles and depositing on your dishes.
By repair one purchases any of the various "rack repair kits" or simply a bottle of rack paint (such as ReRack) and have at it.
Repair basically involves tedious work of cleaning each rusted area, sanding away the rust to bare metal, cleaning again, then applying several coats of rack paint. For the ends of the rack tines you can also purchase little tips that go over the repainted areas. If you do not remove the rust before applying paint/repair it is likely the thing will continue to rust both under and sooner or later break through/above the paint. Unchecked the rust will sooner or later simply eat away at the metal and you'll have another problem.
You may also wish to consider using a rust converter or remover instead and or in addition to sanding. You'll need to follow whatever product you choose directions and make sure not only the stuff is not toxic but will "survive" repeated dw cycles. Certain rust reformer products must cure for two or more days before you can paint over, so that is something to consider as well.
Some persons use a Dremel tool for easier and faster work of sanding down/removing rust from dw racks.
In the end it all comes down to how valuable your time and predicted lasting duration of any repairs versus cost of purchasing a new rack. Some find that even with the best repair work about a year or so later rust is again peeking through. Others simply not wanting to bother with the fumes, time spent and so forth just go out and purchase a new rack.