Both your examples should be get rid of: I suspect a typo. There is a construction need rid of something, short for need to be rid of; but it's almost entirely obsolete.
And you can rid something of something else, or free it (not 'dispose it') of whatever; rid the dog of fleas, for example, or rid the car of the annoying noise. Get rid of was originally a subset of this, something like get yourself rid of the infection. But it has pretty much taken over: I wouldn't advise a non-native speaker to use anything except get rid of.
Clauses beginning with Why are often used as headings to articles that answer the implied question, but the use of a question mark in such cases is inappropriate and misleading.
Best Answer
Definitely "the" nick of time. It is a specific thing - one chance. You don't get nicks of time.