They vary inversely. So if we need E joules to break an x-inch board, that means that E=k/x, for some constant k.
You say that we need 3.7 joules to break a 30-inch board. So 3.7=k/30. Multiply both sides by 30 to get 111=k.
So the equation becomes E=111/x. For a 24-inch board, this means E=111/24=37/8=4.625 joules of energy.