I did this a few months ago. Or, more accurately, I "tried" to do this. Following advice from this forum, I also purchased larger gauge cable, since I was increasing the length (going to location under seat cowl). The ground cable was easy enough. The cable from the starter motor to the solenoid was a disaster.
I can't comment on the CB500, but my CB750's starter motor cable was non-replaceable. The starter motor had a funky looking (to me, anyway) terminal where the cable was soldered. I managed to unsolder it, but could not find a way to solder in the new cable, and eventually I pretty much ruined the starter motor after various failed attempts.
Anyway, it maybe worth taking a closer look at how your cable attaches to the starter. At some point I plan to get another starter motor, and this time I'll relocate the solenoid so that the stock starter cable will reach it. Then I'll make a custom cable between solenoid and battery, which looks much more straight forward. For now it's a kickstart bike
Hope this helps!
Aaron