Relative velocity can be determined from the equation:
vA​=vB​+vA/B​​
where the known velocities in the reference frame given in the problem are:
vA​=vA​sin30°i+vA​cos30°jvB​=vB​cos45°i+vB​sin45°j​
Substituting these into the first relation, with vA​=40ft/s and vB​=30ft/s, we get:
vA/B​​=vA​−vB​=vA​sin30°i+vA​cos30°j−vB​cos45°i−vB​sin45°j=(vA​sin30°−vB​cos45°)i+(vA​cos30°−vB​sin45°)j=(40sin30°−30cos45°)i+(40cos30°−30sin45°)j=(−1.213i+13.428j)ft/s​
The magnitude of this relative velocity is then:
vA/B​=(−1.213)2+13.4282​=13.5ft/s