The main way in which these two men's goals differed was that Johnson was trying to go "all in" to win the war in Vietnam while Nixon was trying to get out of the war. This did not necessarily reflect differences in their attitudes towards communism. Instead, it showed how much the war changed between November of 1963 and 1968.
When Johnson inherited the war from Kennedy, it was still relatively small. Johnson felt that the war was extremely important both to stop communism from spreading and to reassure America's allies that the US would do anything necessary to support its allies. For these reasons, he started to push harder to win the war by using American forces. It was, therefore, under Johnson that American troop presence in Vietnam exploded and it was under Johnson that Americans took over the major combat operations in the war.
By the time Johnson decided not to run following the Tet Offensive, the US public was fed up with the war and it did not appear that the US would be able to win. Therefore, Nixon campaigned on the idea of "peace with honor." His strategy was that of "Vietnamization" in which he wanted the South Vietnamese to fight their own war so the US could withdraw without seeming to lose the war.
Thus, the two presidents' war aims were very different. Johnson was aggressively trying to win the war by pouring more US forces in and getting them more involved while Nixon was trying to withdraw from the war and hand it over to the South Vietnamese.