Ramucirumab and Trifluridine/Tipiracil or Paclitaxel for the Treatment of Patients With Previously Treated Advanced Gastric or Gastroesophageal Junction Cancer

This phase II trial studies the effect of the combination of ramucirumab and trifluridine/tipiracil or paclitaxel in treating patients with previously treated gastric or gastroesophageal junction cancer that has spread to other places in the body (advanced). Ramucirumab may damage tumor cells by targeting new blood vessel formation. Trifluridine/tipiracil is a chemotherapy pill and that may damage tumor cells by damaging their deoxyribonucleic acid (DNA). Paclitaxel may block cell growth by stopping cell division which may kill tumor cells. Giving ramucirumab and trifluridine/tipiracil will not be worse than ramucirumab and paclitaxel in treating gastric or gastroesophageal junction cancer.

PRIMARY OBJECTIVE:

I. To compare, in a non-inferiority fashion, the progression-free survival (PFS) in patients with metastatic refractory gastric/gastroesophageal junction (GEJ) adenocarcinoma receiving the combination of ramucirumab with trifluridine and tipiracil hydrochloride (TAS-102) versus (vs.) paclitaxel and ramucirumab.

SECONDARY OBJECTIVES:

I. To assess overall survival (OS) in this patient population for each regimen. II. Assess changes in patient quality of life (QOL) as measured by the linear analogue self-assessment (LASA) questionnaire for each regimen.

III. To determine the safety of the combination of ramucirumab with TAS-102 in this patient population.

OUTLINE: Patients are randomized to 1 of 2 arms.

ARM A: Patients receive TAS-102 orally (PO) twice daily (BID) on days 1-5 and 8-12, and ramucirumab intravenously (IV) over 30-60 minutes on days 1 and 15. Treatment repeats every 28 days for up to 36 cycles in the absence of disease progression or unacceptable toxicity.

ARM B: Patients receive paclitaxel IV over 1-96 hours on days 1, 8, and 15, and ramucirumab IV over 30-60 minutes on days 1 and 15. Treatment repeats every 28 days for up to 36 cycles in the absence of disease progression or unacceptable toxicity.

After completion of study treatment, patients are followed up at 30-35 days, then every 3 months for up to 3 years.

Eligibility Criteria:
Inclusion Criteria:

* Age \>= 18 years
* Histological or cytological confirmation of adenocarcinoma of the stomach or gastroesophageal junction
* Have locally advanced unresectable or metastatic disease that has progressed =\< 180 days since last treatment
* One or more measurable or nonmeasurable evaluable lesions per Response Evaluation Criteria in Solid Tumors (RECIST)
* Planned for second line treatment defined by failing or were intolerant to previous standard chemotherapies containing one or more of the following agents:

  * Fluoropyrimidine (IV 5-FU or capecitabine) and platinum (cisplatin or oxaliplatin)
  * Trastuzumab in case of HER2-positive disease
  * NOTE: For the patients whose disease recurred =\< 168 days from the last dose of adjuvant anticancer chemotherapy, that adjuvant anticancer chemotherapy is counted as 1 prior chemotherapy line
* Eastern Cooperative Oncology Group (ECOG) performance status (PS) 0 or 1
* Ability to swallow oral medications
* Absolute neutrophil count (ANC) \>= 1500/mm\^3 (obtained =\< 7 days prior to registration)
* Platelet count \>= 100,000/mm\^3 (obtained =\< 7 days prior to registration)
* Hemoglobin \>= 9.0 g/dL (obtained =\< 7 days prior to registration)
* Total bilirubin =\< 1.5 x upper limit of normal (ULN) (obtained =\< 7 days prior to registration)
* Aspartate transaminase (AST) and alanine transaminase (ALT) =\< 3 x ULN ( =\< 5.0 x UNL, if with liver metastasis) (obtained =\< 7 days prior to registration)
* International normalized ratio (INR) =\< 1.5 x ULN, and a partial thromboplastin time (PTT) =\< 5 seconds above the ULN (unless receiving anticoagulation therapy) (obtained =\< 7 days prior to registration)

  * Note: Patients receiving warfarin must be switched to low molecular weight heparin and have achieved stable coagulation profile prior to first dose of protocol therapy
  * Note: Patients on full-dose anticoagulation must be on a stable dose (minimum duration 14 days) of oral anticoagulant or low molecular weight heparin (LMWH)
  * Exception: If receiving warfarin, the patient must have an INR =\< 3.0. For heparin and LMWH there should be no active bleeding (that is, no bleeding within 14 days prior to first dose of protocol therapy) or pathological condition present that carries a high risk of bleeding (for example, tumor involving major vessels or known varices)
* Urinary protein is =\< 1+ on dipstick or routine urinalysis (UA; if urine dipstick or routine analysis is \>= 2+, a 24-hour urine collection for protein must demonstrate =\< 1000 mg of protein in 24 hours to allow participation in this protocol) (obtained =\< 7 days prior to registration)
* Creatinine =\< 1.5 times the ULN or creatinine clearance (measured via 24-hour urine collection) \>= 50 mL/minute (that is, if serum creatinine is \>= 1.5 times the ULN, a 24-hour urine collection to calculate creatinine clearance must be performed) (obtained =\< 7 days prior to registration)
* Negative pregnancy test done =\< 7 days prior to registration, for women of childbearing potential only
* Ability to complete questionnaire(s) by themselves or with assistance
* Provide informed written consent =\< 28 days prior to registration
* Willing to return to enrolling institution for follow-up (during the Active Monitoring Phase of the study)
* Because the teratogenicity of ramucirumab is not known, the patient, if sexually active, must be postmenopausal, surgically sterile, or using effective contraception (hormonal or barrier methods)

Exclusion Criteria:

* Any of the following because this study involves an investigational agent whose genotoxic, mutagenic and teratogenic effects on the developing fetus and newborn are unknown:

  * Pregnant women
  * Nursing women
  * Women of childbearing potential who are unwilling to employ adequate contraception
* Co-morbid systemic illnesses or other severe concurrent disease which, in the judgment of the investigator, would make the patient inappropriate for entry into this study or interfere significantly with the proper assessment of safety and toxicity of the prescribed regimens
* Previous treatment with TAS-102 or ramucirumab
* Previous taxane therapy =\< 180 days prior to registration
* Any grade 3-4 gastrointestinal (GI) bleeding =\< 90 days prior to registration
* History of deep vein thrombosis (DVT), pulmonary embolism (PE), or any other significant thromboembolism (venous port or catheter thrombosis or superficial venous thrombosis are not considered "significant") =\< 90 days prior to registration
* Any arterial thromboembolic events, including but not limited to myocardial infarction, transient ischemic attack, cerebrovascular accident, or unstable angina, =\< 180 days prior to registration
* Prior history of GI perforation/fistula =\< 180 days of registration or risk factors for perforation
* Serious or nonhealing wound, ulcer, or bone fracture =\< 28 days prior to registration
* Major surgery =\< 28 days prior to first dose of protocol therapy, or minor surgery/subcutaneous venous access device placement =\< 7 days prior to registration
* Elective or planned major surgery to be performed during the course of the clinical trial
* Cirrhosis at a level of Child-Pugh B (or worse) or cirrhosis (any degree) and a history of hepatic encephalopathy or clinically meaningful ascites resulting from cirrhosis. NOTE: Clinically meaningful ascites is defined as ascites from cirrhosis requiring diuretics or paracentesis
* Uncontrolled or poorly-controlled hypertension (\>= 150 mmHg systolic or \>= 90 mmHg diastolic for \>= 4 weeks) despite standard medical management
* Immunocompromised and known to be human immunodeficiency virus (HIV) positive and currently receiving antiretroviral therapy

  * NOTE: Patients known to be HIV positive, but without clinical evidence of an immunocompromised state, are eligible for this trial
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements
* Receiving any other investigational agent which would be considered as a treatment for the primary neoplasm
* Other active malignancy =\< 3 years prior to registration. EXCEPTIONS: Non-melanotic skin cancer or carcinoma-in-situ of the cervix. NOTE: If there is a history of prior malignancy, they must not be receiving other specific treatment for their cancer
* Receiving chronic antiplatelet therapy, including dipyridamole or clopidogrel, or similar agents. NOTE: Once-daily aspirin use (maximum dose 325 mg/day) is permitted