Syama travels a distance of 5 km from a place A towards north, turns left and walks 3 km, again turns right and walks 3 km, again turns right and walks 2 km. Finally she turns right and walks 3 km to reach the place B. What is the distance between A and B?