The correct part to whole analogy from the options provided is:
pen : write : : books : library
Explanation: In this analogy, a "pen" is a part that contributes to the action of "writing," while "books" are a part of the larger entity known as a "library." Both comparisons illustrate the relationship of a part to a whole: the pen is needed to write, just as books are crucial components within a library.