How to connect instances in different AWS accounts by private IP?

It is called VPC Peering.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-peering.html

A VPC peering connection is a networking connection between two VPCs that enables you to route traffic between them using private IPv4 addresses or IPv6 addresses. Instances in either VPC can communicate with each other as if they are within the same network. You can create a VPC peering connection between your own VPCs, or with a VPC in another AWS account. In both cases, the VPCs must be in the same region.

Guide here: http://docs.aws.amazon.com/AmazonVPC/latest/PeeringGuide/