Let the slopes of the two lines be m and 2m.
The angle θ between two lines with slopes m1 and m2 is given by
tanθ=1+m1m2m2−m1
Here m1=m, m2=2m and tanθ=31.
31=1+(m)(2m)2m−m
31=1+2m2m
Case 1: 1+2m2m=31
3m=1+2m2
2m2−3m+1=0
(2m−1)(m−1)=0
m=21orm=1
Case 2: 1+2m2m=−31
3m=−(1+2m2)
2m2+3m+1=0
(2m+1)(m+1)=0
m=−21orm=−1
Hence, the slopes of the lines are 21 and 1, or 1 and 2, or −21 and −1, or −1 and −2.