Putting mothballs in the gas tank does not improve a car's performance. That was not always the case, though. Gasoline used to have such a low octane rating that adding napthalene, which was the active ingredient in old mothballs, did in fact increase the octane rating.
Most mothballs manufactured today are not made of napthalene, but of para-dichlorobenzene, which does nothing for a car's engine. While it is still possible to use mothballs made with napthalene in a gas tank, doing so is unnecessary with today's higher-octane gasoline. Also, mothballs have a tendency to gum up engine parts so are best left outside of a gas tank altogether.