In an arithmetic progression (AP), the sum of the first \( n \) terms is given by the formula:
\[ S_n = \frac{n}{2} \times (2a + (n-1)d) \]
where \( a \) is the first term, \( d \) is the common difference, and \( n \) is the number of terms.
Given that the sum of the first six terms \( S_6 = 21 \), we can express this as:
\[ S_6 = \frac{6}{2} \times (2a + 5d) = 21 \]
Simplifying this gives:
\[ 3(2a + 5d) = 21 \]
Dividing both sides by 3:
\[ 2a + 5d = 7 \quad \text{(1)} \]
We also know that the seventh term \( a + 6d \) is three times the sum of the third term and the fourth term. The third term is \( a + 2d \) and the fourth term is \( a + 3d \), so their sum is:
\[ (a + 2d) + (a + 3d) = 2a + 5d \]
According to the problem statement:
\[ a + 6d = 3(2a + 5d) \]
Expanding the right side gives:
\[ a + 6d = 6a + 15d \]
Rearranging this, we can subtract \( a \) and \( 6d \) from both sides:
\[ 0 = 5a + 9d \]
This can be rearranged to:
\[ 5a + 9d = 0 \quad \text{(2)} \]
Now we have the system of equations:
- \( 2a + 5d = 7 \)
- \( 5a + 9d = 0 \)
From equation (2), we can express \( a \) in terms of \( d \):
\[ 5a = -9d \quad \Rightarrow \quad a = -\frac{9}{5}d \quad \text{(3)} \]
Substituting equation (3) into equation (1):
\[ 2\left(-\frac{9}{5}d\right) + 5d = 7 \]
This simplifies to:
\[ -\frac{18}{5}d + 5d = 7 \]
To combine the terms, convert \( 5d \) into a fraction:
\[ -\frac{18}{5}d + \frac{25}{5}d = 7 \]
\[ \frac{7}{5}d = 7 \]
Now, multiply both sides by 5:
\[ 7d = 35 \quad \Rightarrow \quad d = 5 \]
Now, substitute \( d = 5 \) back into equation (3) to find \( a \):
\[ a = -\frac{9}{5} \cdot 5 = -9 \]
Thus, the first term \( a \) and the common difference \( d \) are:
\[ \boxed{-9} \quad \text{and} \quad \boxed{5} \]