As per your snap you have selected different IP address type in rule ,that why your rules are created successfully .
For a brief information on this you can refer this link :
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html?icmpid=docs_ec2_console#security-group-rules
According to what i know is that, it is the default behavior of Security group.
If one or more rule specify the same port ,AWS will apply only most permissive rule for action.
If you specify the same port number for more rules with same IP type(IPv4 or IPv6),
You will be getting error as "the same permission must not appear multiple times".