問得好!
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!