Last Friday, Sam went to high school to sign up for a class.

to high school infinitive
to sign up infin.
Are they both adverb phrases answering where and why?

The first, "to high school," doesn't have a verb, so it's an adverbial prepositional phrase.

You're right about the second: "to sigh up" is an averbial infinitive phrase.

No, "to high school" is not an adverb phrase answering where. It is actually an infinitive phrase that acts as an adjective modifying the verb "went." It tells us the purpose or destination of Sam's action. In this case, it explains why Sam went.

Similarly, "to sign up" is also an infinitive phrase. It functions as an adverbial infinitive explaining the purpose or reason for Sam going to high school. It tells us why Sam went there.

To summarize, "to high school" is an adjective infinitive phrase modifying "went," and "to sign up" is an adverbial infinitive phrase explaining the purpose or reason for Sam's action.