When it comes to those who are being baptized, the priest who has baptized the person has the faculty by the law to confirm that same person or a bishop, of course. This means:
Example 1: If a deacon baptizes them then only the Bishop can confirm them or a priest who has been given special faculties to do so. Therefore, if a deacon baptizes and the pastor confirms, these confirmations would be invalid because the pastor would not have the faculty to confirm.
Example 2: If the parochial vicar baptizes and the pastor confirms, the confirmations would be invalid because the pastor in this case would not have the faculty to confirm but the parochial vicar would have the faculty to confirm them because he baptized them.