What's the difference between 同样 and 一样 I'm so confused about this two phrases, I think they can be used interchangeably in most circumstances, but here's the examples: 

他们两个长得一样。
Why can't we say 他们两个长得同样? 

妈妈点了一杯咖啡，我也一样。
Why can't we say 妈妈点了一杯咖啡，我也同样?

他认识我，同样，我也认识他。
Why can't we say 他认识我，一样，我也认识他?

I feel like my head is going to explode! Could you please give me some detailed explanation? I'd be extremely grateful.
問得好!

Here are some differences. 

syntactic difference:


一樣 can be a predicate (謂語).
同樣 is only used as a modifier 修飾語, i.e. in front of a noun and connected with 的 (adjectival) , or in front of a verb phrase, or sentence (adverbial). 


semantic difference:


一樣 same (identical)
同樣 same (equivalent)


I think these will account for your examples:


他们两个长得同样:  V得 here requires a predicate, so 同样 is bad.
妈妈点了一杯咖啡，我也一样: here 一样 is pro-verb (not proverb) which resumes the predicate 点了一杯咖啡; 同样 can't do that.
他认识我，同样，我也认识他: here 同样 is an adverbial; it means 'in the same way'


Another example, that (I think) shows the semantic difference:


我在美國看到同樣的情形: I saw the same (equivalent) situation in America.


I'm a little less sure on this one, but I don't think it has to be an exactly identical situation; just one that strikes me as fundamentally equivalent.

Anyway, nice examples, and good careful thinking!