Here we have a triangle XYZ where angle ZYX is 180-45=135 degrees. And we have YZ=5km and XY=3km.
We have two sides and the included angle so we can use the cosine rule to find XZ:
XZ^2=5^2+3^2-2*5*3cos135=34+30cos45=34+15√2=55.213, so XZ=7.43km approx.
Now for the angle ZXY which we can find using the sine rule:
sin135/ZX=sinZXY/5 and sinZXY=5sin135/√(34+15√2)=0.4758 approx, so ZXY=28.41 degrees or 28 degrees to the nearest degree. The bearing is the number of degrees from north, so we need to work out 90-28.41=61.59 or 62 degrees approximately, so the bearing is N62W, 62 degrees west of north.