Praise be to Allah.
We do not see anything wrong with this, and the ulama stated that there is nothing wrong with doing this, so that his witr will be at the end of the night. He will be considered to have prayed with the imam until he finished, because he stayed with him until he finished, and added another rakah for a shar'i reason, which was so that he could pray witr later in the night. There is nothing wrong with this, and it does not mean that he did not stay with the imam until he finished, but he did not finish with him he delayed it a little longer.
Comment