I think a preliminary step is to talk to an advisor or someone near you who can read your paper. The intention you state is good, but I think it could be phrased more artfully. Here is what I recommend.
Line up one or two people at your institution (people who taught one of your classes, or someone in your department who might have contact with the professor whose work you have used). Get their opinion on the advisability of reaching out and making your request. Ask them for how they might word your request.
If possible, contact a student or coauthor of this professor and relate your concerns. As I understand it, your first concern is to get your work published and your second is not to step on any toes, especially those of the person whose work you have extended. If this student or coauthor is in the relevant fields, ask them for a sense of how publishable your result is.
Based on this feedback, choose to approach the professor with the intention of announcing your work to him and ask if he (pronoun presumption on my part) is interested in reading it. Then let him make the next move.
In all of this, pick someone to tell of your process. There should be no reason for anything horribly wrong to happen. If and when it does happen, it helps to have someone who already knows your side of the story.
Gerhard "Plans To Backup His Backups" Paseman, 2020.06.12.