No, it won't.
1) The papers on the arXiv are preprints (in former times this meant "before printed publication"…) and as such, it is normal that they will be eventually published in a journal. Hence, many journals do not have a problem when the receive submission of paper that are already on the arXiv. So, uploading to the arXiv prior to submission to a journal is not plagiarism - it's just the same paper.
2) The first submission of the paper to journal A is not public. Submitted information is confidential for most journals (there are newer concepts of open review processes, but I assume that this was not the case here) and also journal A decided not to publish the paper. Hence, you are free to submit the paper to another journal and again, this is the same paper and no plagiarism.
Both points together imply that your in situation there is no plagiarism. You have one paper, available as a preprint, once rejected, once resubmitted. Totally normal… (I had the same paper available on two different preprint repositories and submitted two times to different journals.)