There are 4 really good factors to talk about when thinking about why Johnson chose to escalate the conflict in Vietnam.
1. The most important factor is containing communism - making sure that communism didnt spread to nearby countries was really important to Kennedy and Johnson, so they believed their best chance to stop communsm was in Vietnam.
2.The second most important factor was a desire to look strong on Kennedy's part, as a new president (and a young one at that!) Kennedy needed a good victory to show that he was a worthy successor to Eisenhower - a president known for his strength.
3. The third factor is Johnson's continuation of Kennedy's legacy. Following Kennedy's assassination Johnson had a political obligation to pursue the same foreign policy as Kennedy.
4. Finally, Kennedy's advisers were convinced by the Domino Theory - and were commonly known as Hawks for their aggressive attitude towards foreign policy.