This is a good question.
IMO, you don't need anything in that sentence though. And, I'm a non-native speaker. Though the question is not asked to us, I'd like to express what I think about the use of 'when' and 'while'. What is preferred by native speakers, they'd only answer.
Smartphones allow Internet access on the road - seems okay to me!
But then, if it's about putting while or when...
Both 'when' and 'while' indicate time-related actions. Both the words are quite often used in sentences with past progressive and simple past tenses. In such cases, while generally refers to a comparatively long action, on the other hand, when could be both a comparatively long or short action. Also, while has a clause with a simultaneous activity or ongoing activity.
In that sense, both seems okay to me. Smartphones allow Internet access while/when on the road.
Nevertheless, when you are going from one place to another place, your smartphone will get you the Internet access while on the road. And, when your friend asks whether smartphones allow access, you may simply nod and say that smartphones allow Internet access when on the road.
Of the two sentences you give They are both equal to each other is grammatical and They both equal to each other is not. "equal" in "equal to" is an adjective, so sentence 2 lacks a verb.
We can use equal as a verb, this would give the sentence They both equal each other.
They are both equal to each other and They both equal each other are grammatical and they express the same thing.
As others have noted there is redundancy in the above sentences, unless there is room for confusion a more concise sentence is preferable. - However without knowing more about context I would not state that sentence 1 is wrong.
Avoiding the redundancy is bad if there is room for confusion. For example if you are trying to make the following point; "Since a equals b we know that they both equal each other."
Best Answer
Not only are both "an opportunity" and "the opportunity" acceptable, both are commonly in use in North America. Subjectively, I feel as if there is no bias towards one phrase or the other, so I pulled up a Google Ngram for the two phrases, and it suggests that "an opportunity" was more common prior to 1980, while "the opportunity" is more common today. Not much more common, to be honest, but slightly.
Strictly speaking, there is a subtle difference between the phrases. "This gives me the opportunity" suggests that there is an opportunity that we are both aware of, while "this gives me an opportunity" suggests that there are more opportunities than this one. In practice however, the phrases are used interchangeably and without any real or true distinction.