You download the SDK and add it to the MCUXpresso, in it are the examples of the magnetometer, so when you import an example from the sdk, for the case of the k22 the motherboard examples are from the fxls8964 only, but in the k64 it includes the fxos8700, however, you can pull the libraries from one to the other for your development of your board.