As you say の can replace が as a subject marker.
For the first sentence, just as in 1 and 2 in the question, の/が are (to an extent) interchangeable: スポーツのある/スポーツがある are both fine.
In the second one, using が is most probably possible and won't change meaning much. But grammatically, as noted in the comment, they are different:
The sentence as is has an implicit subject which should be what is being discussed: (それは)...どこを歩いているのかの違いであり, which literally means It is a matter of where you are walking....
On the other hand, using が would make where you... the subject (of である): どこを歩いているかが違いである = Where you are walking ... is the difference. This is ok grammatically, but it sounds like emphasizing the difference and does not seem to fit the context (the emphasis should be 変わりはない).