I created instance with correct details but what is the issue.
Please help.
No it is differnet question.
Where did you get the CIDR block you put in the SG rule? The VPC CIDR in these accounts is usually 172.31.0.0/16
You need to ensure it is the CIDR of the correct VPC if there is more than one, but it would help if you include what Level and the Question Title of this task.
If this is the VPC peering question and I suspect it might be, then does it not say that you must be able to ping the private instance from the public instance? A SG rule for only port 22 will not allow this and the grader will fail the ping. The rules would need to include one for ICMP protocol as well. The source CIDR for all protocols would be that of the VPC containing the public instance as that is where the traffic originates.