Answer :

Let the two segments be x and y
x+y=45...1
X/y = 2/3...2
From1, y=45-x
Sub this into 2
x/(45-x)=2/3
3x=90-2X
5x=90
x=18
y=45-18=27