Determination of the relative transition probabilities of some triplet lines in the atomic spectra of calcium and strontium