13.442 In the store, goods of the first and second grades arrived for a total amount of 450 rubles. An inspection determined that all the goods could only be sold at the price of the second grade, as a result of which the company would incur a loss of 50 rubles. The company eliminated the defects in the first-grade goods and brought the second-grade goods up to the condition of the first grade. Having received permission to sell all the goods at the price of the first grade, the store gave the company a profit of 30 rubles. What was the initial value of all the first-grade goods and all the second-grade goods separately?
Solution. Let $x$ and $y$ be the cost of the first and second grade goods, respectively; $a$ and $b$ be the quantity of the first and second grade goods. Then $\frac{x}{a}, \frac{y}{b}$ are the cost per unit of the first and second grade goods, respectively.

According to the conditions of the problem, we have:

$$
\left\{\begin{array} { l } 
{ x + y = 450 , } \\
{ \frac { x } { a } ( a + b ) = 450 + 30 } \\
{ \frac { y } { b } ( a + b ) = 450 - 50 }
\end{array} \Rightarrow \left\{\begin{array} { l } 
{ x + y = 450 , } \\
{ 1 + \frac { b } { a } = \frac { 480 } { x } , } \\
{ 1 + \frac { a } { b } = \frac { 400 } { y } }
\end{array} \Rightarrow \left\{\begin{array} { l } 
{ x + y = 450 , } \\
{ ( \frac { 480 } { x } - 1 ) \cdot ( \frac { 400 } { y } - 1 ) = 1 }
\end{array} \Rightarrow \left\{\begin{array}{l}
x=300, \\
y=150 .
\end{array}\right.\right.\right.\right.
$$

Answer: 300 rubles, 150 rubles.