(a) When a function is transferred from one agency to another, each competing employee in the function shall be transferred to the receiving agency for employment in a position for which he is qualified before the receiving agency may make an appointment from another source to that position.

(b) When one agency is replaced by another, each competing employee in the agency to be replaced shall be transferred to the replacing agency for employment in a position for which he is qualified before the replacing agency may make an appointment from another source to that position.