So i have the figure below:
and i want to find the angle $a$ as shown in green. I have the coordinates of the blue points where
$x_i,y_i = (4,2)$ and $x_j,y_j = (4.3589, 1)$
According to the answer, $a$ is 13.6441 degrees, but i do not know how to work it out.
I used the formula
but I'm not getting the same answer.


Your formula is fine, but you must switch your points, because $(x_1,y_1)$ in that formula refers to the point before rotation, which in your case is $(4.3589, 1)$, while $(x_2,y_2)$ refers to the point after rotation, which in your case is $(4, 2)$.