Given the tetrahedron $ABCD$ whose edges $AB$ and $CD$ have lengths $a$ and $b$ respectively. The distance between the skew lines $AB$ and $CD$ is $d$, and the angle between them is $\omega$. Tetrahedron $ABCD$ is divided into two solids by plane $\epsilon$, parallel to lines $AB$ and $CD$. The ratio of the distances of $\epsilon$ from $AB$ and $CD$ is equal to $k$. Compute the ratio of the volumes of the two solids obtained.
1. **Construction:**
   - Given a tetrahedron \(ABCD\) with edges \(AB\) and \(CD\) having lengths \(a\) and \(b\) respectively.
   - The distance between the skew lines \(AB\) and \(CD\) is \(d\), and the angle between them is \(\omega\).
   - The tetrahedron is divided into two solids by a plane \(\epsilon\), which is parallel to lines \(AB\) and \(CD\).
   - The ratio of the distances of \(\epsilon\) from \(AB\) and \(CD\) is \(k\).

2. **Geometric Setup:**
   - Through point \(B\), draw line \(n\) such that \(n \parallel CD\).
   - Through point \(C\), draw line \(m\) such that \(m \parallel AB\).
   - Planes \((AB, n)\) and \((CD, m)\) are parallel.
   - There is a unique line \(EF\) perpendicular to both \(AB\) and \(CD\) and crossing them.
   - On \(EF\), place point \(M\) such that \(\frac{|ME|}{|MF|} = k\).

3. **Plane \(\epsilon\):**
   - Construct plane \(\epsilon\) through point \(M\) parallel to lines \(AB\) and \(CD\).
   - Plane \(\epsilon\) intersects \(AD\) at point \(P\), \(AC\) at point \(Q\), \(BC\) at point \(R\), and \(BD\) at point \(S\).
   - Points \(P, Q, R, S\) divide \(AD, AC, BC, BD\) in the same ratio \(k\).
   - These points form a parallelogram with \(AB \parallel PS \parallel QR\) and \(CD \parallel PQ \parallel SR\).

4. **Volume Calculation:**
   - The tetrahedron is divided into two truncated prisms: \((PS, QR, AB)\) and \((PQ, RS, CD)\).
   - Using the theorem for the volume of a truncated prism, the volume is one-third the product of the sum of the lengths of the lateral edges and the area of the perpendicular cross-section.

5. **Lengths of Lateral Edges:**
   - For the truncated prism \((PS, QR, AB)\):
     \[
     |AB| = (k+1)|PS| \quad \text{and} \quad |AB| = (k+1)|QR|
     \]
     \[
     \text{Sum of lateral edges} = |AB| + |PS| + |QR| = |AB| \left(1 + \frac{2}{k+1}\right)
     \]
   - For the truncated prism \((PQ, RS, CD)\):
     \[
     |PQ| = \frac{k}{k+1}|CD| \quad \text{and} \quad |SR| = \frac{k}{k+1}|CD|
     \]
     \[
     \text{Sum of lateral edges} = |CD| + |PQ| + |RS| = |CD| \left(1 + \frac{2k}{k+1}\right)
     \]

6. **Area of Perpendicular Cross-Section:**
   - The area of the perpendicular cross-section of the truncated prism \((PS, QR, AB)\) is \(k^2 \cos \omega \cdot T\), where \(T\) is the area of the perpendicular cross-section of the truncated prism \((PQ, RS, CD)\).

7. **Volume of Truncated Prisms:**
   - Volume of \((PS, QR, AB)\):
     \[
     V_1 = \frac{1}{3} |AB| \left(1 + \frac{2}{k+1}\right) k^2 \cos \omega \cdot T
     \]
   - Volume of \((PQ, RS, CD)\):
     \[
     V_2 = \frac{1}{3} |CD| \left(1 + \frac{2k}{k+1}\right) T
     \]

8. **Ratio of Volumes:**
   - The ratio of the volumes of the two solids is:
     \[
     \frac{V_1}{V_2} = \frac{\frac{1}{3} |AB| \left(1 + \frac{2}{k+1}\right) k^2 \cos \omega \cdot T}{\frac{1}{3} |CD| \left(1 + \frac{2k}{k+1}\right) T}
     \]
     \[
     = \frac{|AB|}{|CD|} \cdot k^2 \cdot \frac{1 + \frac{2}{k+1}}{1 + \frac{2k}{k+1}} \cdot \cos \omega
     \]
     \[
     = \frac{a}{b} \cdot k^2 \cdot \frac{k+3}{3k+1} \cdot \cos \omega
     \]

The final answer is \(\boxed{\frac{a}{b} \cdot k^2 \cdot \frac{k+3}{3k+1} \cdot \cos \omega}\).