The first rule accepts traffic being forwarded from
$INTERNALNET with destination port 22/tcp.
The second rule accepts traffic being forwarded from
$EXTERNALNET with source port 22/tcp.
In a proper configuration of a stateful firewall like iptables, there should be no need for rules to allow traffic based on source port, since both directions of validly established TCP streams are allowed. Doing otherwise can lead to security holes--in this case, allowing all outbound traffic so long as it has a source port of 22/tcp.
With a non-stateful configuration, the example given is probably about the best that can be accomplished.