IF the used rear sprocket & chain are *as new*, go ahead & get the 520 front sprocket & have at it.
If you have ANY doubt whatsoever about the wear of the used sprocket &/or chain, buy new components.
For typical street riding replacement, I recommend the OEM 525 setup.