This phase I trial studies the side effects and best dose of Akt inhibitor MK2206 and lapatinib ditosylate when given together with trastuzumab in treating patients with locally advanced or metastatic human epidermal growth factor receptor-2 (HER2)-positive breast, gastric, or gastroesophageal cancer that cannot be removed by surgery. Akt inhibitor MK2206 and lapatinib ditosylate may stop the growth of tumor cells by blocking some of the enzymes needed for tumor growth. Monoclonal antibodies, such as trastuzumab, can block tumor growth in different ways. Some block the ability of tumor cells to grow and spread. Others find tumor cells and help kill them or carry tumor-killing substances to them. Giving Akt inhibitor MK2206 and lapatinib ditosylate together with trastuzumab may kill more tumor cells.