The calculated distance (air line) between Masquefa and Palma is approximately 141 miles respectively 226 kilometers.
By car or train, the actual journey to Palma is certainly longer, as only the direct route (as the crow flies) between Masquefa and Palma has been calculated here.