Take difference between points:
x2 - x1 = 6
Since you want the point of trisection nearer to 'B', take 2/3 rd of the difference. 2/3rd of difference = 6*(2/3) = 4
Similarly for difference in y: y2 - y1 = 3
2/3rd of (y2-y1) = 3*(2/3) = 2
Now the trisecting point near 'B' will be: [ Starting point + adjusted difference ]
= (1,2) + (4,2) = (5,4)
Therefore, (5,4) is the point about which the line is rotated, and thus our final line will also pass through (5,4).
Original slope of line(m) = y2-y1/(x2-x1) = 1/2. Thus angle made by original line = tan-1(1/2).
Rotated by 45 deg in anti-clockwise, New angle made with x-axis = 45 + tan-1(1/2)
Therefore, slope of new line = tan(45 + tan-1(1/2) )
Using property: tan(A+B) = (tanA + tanB) / (1 - tanAtanB) and the property tan(tan-1x) = x, we will get the slope equal to 3.
Now we have the slope(m) = 3 and the point (5,4) of the resultant line, thus calculating the line equation as:
y - 4 = 3(x - 5)
y = 3x -11