6. Variant 1.

Petya wrote the numbers from 1 to 10 on cards and laid them out along the edge of a $3 \times 4$ rectangle. At first, one of the cards - with the number 7 - was opened (see the figure). When the other cards were opened, it turned out that the sum of the numbers in the top and bottom horizontal rows is the same and equals $A$. What is the largest possible value of the number $A$?

| $\circ$ | $\circ$ | $\circ$ | $\circ$ |
| :---: | :---: | :---: | :---: |
| 7 |  |  | $\circ$ |
| $\circ$ | $\circ$ | $\circ$ | $\circ$ |
Answer: 23.

Solution. Let $B$ be the last number in the second horizontal row. Since the sum of all numbers from 1 to 10 is 55, we have $2A + B + 7 = 55$ or $B = 48 - 2A$. It follows that $B$ is an even number. To make $A$ the largest, $B$ needs to be the smallest. The smallest even number among the given numbers is 2. Then $2A = 55 - 9$, so $A = 23$. We will show that an example of such an arrangement exists. Let the numbers in the first row be $10, 6, 4, 3$, and in the second row - $1, 5, 8, 9$.