expression
together (of two people); both (of you, them, etc.)
Used when two people do something together or share a state. Often implies joint action or mutual involvement.
二人して同じことを考えていた。
We were both thinking the same thing.
彼らは二人して大笑いした。
The two of them laughed loudly together.
一緒に is the general word for 'together' for any number of people. 二人して specifically refers to two people and often emphasizes that both are doing something.
二人とも means 'both (of two people)' and is used as a noun phrase. 二人して is an adverbial phrase meaning 'the two of them doing something together'.
Phrase composed of 二人 (two people) + して (classical form of する, here functioning as a particle-like element indicating manner or state).