Say that www.onlyasamlple.com has keyword stuffed on "sample". Will this stuffing reduce the ranking for www.onlyasample.com/othersample on "sample" as well?
According to Google:
Filling pages with keywords or numbers results in a negative user experience, and can harm your site's ranking.
It's counterproductive to engage in this practice, so just don't do it.