Bearing from the point after 4km to the starting point is 180-038=142degree.
So if you draw the 4km line and 5km lines on a piece of paper, there are 3 angles around that point 4km from the starting...
Since the height is X, the length is 3X.
Also, since the slanted side is 2cm more than the height, the slanted side is X+2.
So... The perimeter is 2(3X+X+2).