Joint authorship for rewriting and extending an existing article
This is an absolutely normal and exemplary case of collaboration.

Work together on the final article and, if you meet the normal criteria for authorship in your field, then you should be an author. If not, you can be in the acknowledgements.

As for the preprint: if it is a separate standalone document like a tech report, then cite and state that this is an extended version. If it in a service that supports updating like arXIv, then you should end up with an updated preprint with your name on it in any case!