I think tree form is [form:5], same as moonkin (depends on spec of course), so something like, with approriate spells.
#showtooltips
/cast [form:5] Travel Form; [form:3] Tree form
So you'd go to travel if in tree otherwise morph to tree form.
But i still think its easier to just bind a key for each of your 3 Main forms (Bear, cat and Tree) and another for travel.
That way you can 'power-shift' easily staying in the desired form, or do any number of combinations eg Bear-travel, cat-bear, tree-bear etc etc.
Never seen macroes use "form" before, but I know that the first will work. Had some similar ones back in tbc...
/cast [stance:3] Tree of Life; [stance:5] Travel Form