This demo creates 4 VPCs within the same account and region that are connected to each other with a transit gateway. In general those VPCs could be in different accounts and regions though.
You can connect to any instance by using Session Manager. To demonstrate connectivity between the instance you can make an HTTP request to the private IP address of any other instance.