Line 1 - The event is on drop of the small box
Line 2 - is a sub event to line 1 and checks to see if you dropped it over the large box
Line 3 - is a sub event of line 2 and compares the distance between the small box position and ImagePoint(0) and see if it's less than the distance between small box position and ImagePoint(1). If it is I set small box's position to large box's ImagePoint(0) and pin it to large box by position and angle.
Line 4 - this is also a sub event of line 2 (If there are only 2 image points you probably don't need this, you could just use an Else statement) It checks to see if it's a shorter distance to ImagePoint(1) if it is I set the small box's position to the large box's ImagePoint(1) position, and pin it there.
Line 5 - Unpins the small box on the start of a drag in case you want to move it after you have dropped it on the large box.