If you have not copied as you said, you are satisfied.
Try to make it clear to the teacher once & tell that she can look at both papers. He might have copied you. But forget about it , forgive him. Do not worry.
Next time sit away from him. Inshallah due to this good act you will get 1st position.