What's being said here is that two fractions are equal to each other, but the numbers in the numerators are different. That must mean that to get from one fraction to the other, the numerator must have been multiplied by some number. In this case, 6 is multiplied by 3 to get 18. But we cannot simply multiply the numerator by any number without also multiplying the denominator by that same number. So j is an unknown number that we multiply by 3 to get 21. This means j must be 7. In other words, 6/7 = 18/21.
Similarly, you could solve by cross multiplying. a/b = c/d if and only if ad = bc. So 6/j = 18/21 means that 21 x 6 = 126 = 18j. We solve for j by dividing by 18: 126/18 = j = 7.