Based on the information provided, the direction of rotation appears to be a 270° clockwise rotation.
This is because the point A has been rotated to a new point A' at (5, -1), which is 270° clockwise from the original point A at (1, 5) with respect to the origin. A 270° clockwise rotation will also cause point B to move to the right and down, point C to move further down and to the right, and point D to move to the right and up.
A 90° counterclockwise or 180° clockwise rotation would not result in the point A being mapped to the point A'. Similarly, a 270° counterclockwise rotation would cause point A to end up in quadrant 3, which is not consistent with the given information.