For two vectors to be perpendicular, their dot product must be zero:
\[
\vec{a} \cdot \vec{b} = 0.
\]
Substitute \(\vec{a} = a\hat{i} + b\hat{j} + \hat{k}\) and \(\vec{b} = 2\hat{i} - 3\hat{j} + 4\hat{k}\):
\[
(a\hat{i} + b\hat{j} + \hat{k}) \cdot (2\hat{i} - 3\hat{j} + 4\hat{k}) = 0.
\]
Simplify:
\[
2a - 3b + 4 = 0.
\]
This gives the first equation:
\[
2a - 3b = -4.
\]
From the problem, another equation is given:
\[
3a + 2b = 7.
\]
Solve the simultaneous equations:
Multiply equation (1) by 2:
\[
4a - 6b = -8.
\]
Multiply equation (2) by 3:
\[
9a + 6b = 21.
\]
Add equations (3) and (4):
\[
13a = 13 \quad \Rightarrow \quad a = 1.
\]
Substitute \(a = 1\) into equation (2):
\[
3(1) + 2b = 7 \quad \Rightarrow \quad 3 + 2b = 7 \quad \Rightarrow \quad 2b = 4 \quad \Rightarrow \quad b = 2.
\]
The ratio of \(a\) to \(b\) is:
\[
\frac{a}{b} = \frac{x}{2} \quad \Rightarrow \quad \frac{1}{2} = \frac{x}{2}.
\]
Thus:
\[
x = 1.
\]