# Solution.

Let's introduce the following notations:

$x$ - the price of one share of Dvanefte,

$y$ - the price of one share of Raznefte,

$z$ - the price of one share of Trinefte,

$n$ - the number of shares in the Dvanefte package,

$m$ - the number of shares in the Raznefte package.

The other conditions of the problem can be written as a system of equations and inequalities:

$\left\{\begin{array}{l}3 x n=y m, \\ x n+y m=z(m+n), \\ 10 \leq y-x \leq 18, \\ 18 \leq z \leq 42 ;\end{array}\left\{\begin{array}{l}\frac{m}{n}=\frac{3 x}{y}, \\ y=x+a, \\ z=x+\frac{a m}{n+m}, \\ 10 \leq a \leq 18, \\ 18 \leq z \leq 42,\end{array}\right.\right.$

We need to find the limits of the value $\frac{n}{n+m+(n+m)} \cdot 100 \%=\frac{n}{2(n+m)} 100 \%$.

If we can find the ratio $\frac{m}{n}$, the problem will be solved, since $\frac{2(n+m)}{n}=2\left(1+\frac{m}{n}\right)$.

First, let's determine under what conditions the percentage of Raznefte shares in the total lot will be the smallest.

For this, $\frac{n}{2(n+m)} \rightarrow \min$, if $n \rightarrow \min , m \rightarrow \max , y-x \rightarrow \min$, therefore, $y-x=10, a=10$.

If $n \rightarrow \min , m \rightarrow \max$, then $z=x+\frac{10 m}{n+m} \rightarrow \max$, therefore, $z=42$.

Then, $x=\frac{10 m}{3 n-m}, z=\frac{10 m}{3 n-m}+\frac{10 m}{n+m}=42$.

$5 m(3 n-m+n+m)=21(3 n-m)(n+m), 20 m n=21\left(3 n^{2}+2 m n-m^{2}\right), 21 m^{2}-22 m n-63 n^{2}=0$,

$21\left(\frac{m}{n}\right)^{2}-22 \frac{m}{n}-63=0, \frac{m}{n}=\frac{7}{3}, \frac{m}{n}=-\frac{9}{7}$.

According to the problem's conditions, we choose $m=\frac{7}{3} n$, then the smallest percentage $\frac{n}{2(n+m)} 100 \%=15 \%$.

Similarly, let's find the largest percentage:

For this, $\frac{n}{2(n+m)} \rightarrow \max$, if $n \rightarrow \max , m \rightarrow \min , y-x \rightarrow \max$, therefore, $y-x=18, a=18$.

If $n \rightarrow \max , m \rightarrow \min$, then $z=x+\frac{18 m}{n+m} \rightarrow \min$, therefore, $z=18$.

Then, $x=\frac{18 m}{3 n-m}, z=\frac{18 m}{3 n-m}+\frac{18 m}{n+m}=18$,

$m^{2}+2 m n-3 n^{2}=0$

$\left(\frac{m}{n}\right)^{2}+2 \frac{m}{n}-3=0, \frac{m}{n}=1, \frac{m}{n}=-3$

According to the problem's conditions, we choose $m=n$, the largest percentage $\frac{n}{2(n+m)} 100 \%=25 \%$.

Answer. The lot contains from $15 \%$ to $25 \%$ of Dvanefte shares from their total number.
Task 6. (30 points) A lot consisting of three packages of shares of oil companies - Razneft, Dvaneft, and Trineft - is up for auction. The total number of shares in the packages of Razneft and Dvaneft matches the number of shares in the Trineft package. The package of Dvaneft shares is three times cheaper than the package of Razneft shares, and their combined value matches the value of the Trineft package. The price of one share of Razneft exceeds the price of one share of Dvaneft by an amount ranging from 10 thousand rubles to 18 thousand rubles, while the price of one share of Trineft fluctuates between 18 thousand rubles and 42 thousand rubles. Determine the smallest and largest percentage of the total number of shares in the lot that the Dvaneft share package can constitute.