Every scrimmage down can have one, none or both of the following:
1 pass behind the line of scrimmage before possession change.
1 kick behind the line of scrimmage before possession change.
The order doesn't matter, and what proceeds the pass or kick doesn't matter (as long as there is no possession change).
Pass downfield, ball comes behind the line of scrimmage somehow (without the defense taking it there), a legal kick can be made.
Kick downfield, ball comes behind the line of scrimmage somehow (without the defense taking it there), a legal pass can be made.