The pinion tooth profile is the envelope of a family of the pin circles, centers of which are on an involute traced by pin circle center when the pin rack rolls without slipping on the pinion.
The pinion can engage both sides of the pin rack. It is impossible for the tooth rack.