On certain linear mappings between inner-product and squared-distance matrices