What is the underlying grammar pattern behind 同样是 in the textbook 高级汉语口语?
To keep things simple, there are two things to note when using 同樣是⋯⋯:

The sentence pattern is for contrast. What that is same for the groups (≥2) is mentioned first, only to be followed by a transition.

What immediately follows 同樣是⋯⋯ can be the subject, the object, or the predicate, as long as it is common for the groups (to be contrasted).



同樣是主食，南方人吃米，北方人吃麵。
Despite both being staples, rice is eaten by Southerners, whereas noodles are eaten by Northerners.

This is a sentence that compares the kind of staple in Southern and Northern China. The common element is 'staple' and is fronted in the sentence. Also note how I had to convert the latter two sentences into passive, because unlike Chinese, the first clause in English has to refer to the subject by default.

Similarly,

同樣是從小一起長大的同學，有的做了經理，有的成了教授，也有的做了售貨員或者出租車司機。
Despite being classmates that grew up together, some became business managers, some became professors; some also became salespersons or cab drivers.

This emphasises how different the classmates have become in life despite growing up together. Here the subject (從小一起長大的同學) is fronted.

同樣是手錶，有的是電子的，有的是機械的，有的能當鬧鐘用，還有的能照相。
Despite all being watches, some are electronic, some are mechanical, some can be used as an alarm, some can even be used to take pictures.

Again this emphasises how different in kind watches can be. The subject is fronted. (It's convenient to look at 有的 as an adjective here.)

What is fronted can also be the predicate of the sentence, as in

同樣是教育孩子，有的人很開明，有的人卻只會打罵。
When it comes to teaching children, some take a liberal approach, but some only beat and scold their children.

This is a comparison between the approach to teaching children.