fix name of argument in docstring and the docs (closes #25076)

Patch by TAKASE Arihiro.
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst
index 8366d8a..92803b1 100644
--- a/Doc/distutils/apiref.rst
+++ b/Doc/distutils/apiref.rst
@@ -516,7 +516,7 @@
 
    .. method:: CCompiler.library_option(lib)
 
-      Return the compiler option to add *dir* to the list of libraries linked into the
+      Return the compiler option to add *lib* to the list of libraries linked into the
       shared library or executable.