The only 2 known references to the Law of Affinity by Alice A. Bailey (AAB) in her voluminous writings and those given to her by Djwhal Khul (DK). Links on these pages of The Laws of Alice A. Bailey are to the online books at the Lucis Trust website.
What is a law?
… a law is but the spiritual impulse, incentive and life manifestation of that Being in which he lives and moves. A Treatise on White Magic , INTRODUCTORY REMARKS
A law is an expression or manifestation of force applied, under the power of thought, by a thinker or group of thinkers. Discipleship in the New Age, Vol. I , SECTION ONE – DISCIPLESHIP IN THE NEW AGE – Part 2
… a law is in reality the effect of the life of a greater entity as it encloses a lesser within its living processes.
Esoteric Healing , Part Three – The Fundamental Laws of Healing
… a law is but the effect of the continued intelligent activity of the Life aspect as it works in conjunction with matter. Esoteric Psychology – Volume I , 5. The Rays in Cyclic Manifestation
A law is only an expression or manifestation of force, applied under the power of thought by a thinker or group of thinkers. Esoteric Psychology – Volume II , II. The Seven Laws of Soul or Group Life – Part 5
A law presupposes a superior being who, gifted with purpose, and aided by intelligence, is so coordinating his forces that a plan is being sequentially and steadily matured. A Treatise on White Magic
Quotes I found below:
As we have studied these various constellations, it will have become apparent to you that the main function of the planets is to be distributing agents for the energies emanating from the zodiac as they converge within our solar system and become attracted to our planet. Students need to understand more thoroughly than they do that the basis of the astrological sciences is the emanation, transmission and reception of energies and their transmutation into forces by the receiving entity. The energies of the various signs are attracted by the different planets according to their stage  of development and by what is esoterically called “ancient relationship” between the informing entities of the planets and of the constellations. This relation exists between beings and is founded on a Law of Affinity. It is this law of affinity which produces the magnetic pull and the dynamic response between constellations and planets within the solar system and between some particular planet and the forms of life upon another planet and the “impending energies,” as they are called, which are being received from some major source. The capacity to receive and profit by the planetary energies (themselves received as emanated from some constellation) is dependent upon the point in evolution which determines the receptivity and the responsiveness of the mechanism of reception. This constitutes an unalterable law and accounts for the power of certain planets which may have hitherto remained undiscovered and which have therefore had little to do with evolution up to the present, owing to the unresponsiveness of the forms of reception. The planets, the energies and forces have existed all the time but have remained ineffective and consequently undiscovered owing to the non-existence of the needed instruments of response. They will, therefore, have no effect upon the life and history of an individual and only become potent and “magnetically informing” when a man has reached a certain point of development and is becoming sensitive to higher influences and is in preparation for the treading of the path. This readiness indicates that his response apparatus (the threefold personality) is more sensitive than is the case with the average person, and can respond to a higher range of vibrations than would otherwise be possible. Herein also lies the distinction between the sacred and the non-sacred planets. The Lords of the planets (the ray Lives or planetary Logoi) are also, on Their own level, unequally  developed and some of them are further advanced upon the cosmic path of spiritual unfoldment than are others; Those Who are definitely upon the Cosmic Path of Discipleship are regarded as informing sacred planets, whilst Those Who are upon the Cosmic Probationary Path are expressing Themselves through non-sacred planets. This point I shall later elaborate when we come to that part of this section in this treatise which is intended to deal with this matter. The point I seek to make here is that it is all a question of developed reception and sensitivity.
You are welcome to post your comments and understanding of this law.