The following diagram shows four adjacent $2\times 2$ squares labeled $1, 2, 3$, and $4$. A line passing through the lower left vertex of square $1$ divides the combined areas of squares $1, 3$, and $4$ in half so that the shaded region has area $6$. The difference between the areas of the shaded region within square $4$ and the shaded region within square $1$ is $\frac{p}{q}$ , where $p$ and $q$ are relatively prime positive integers. Find $p + q$.
[img]https://cdn.artofproblemsolving.com/attachments/7/4/b9554ccd782af15c680824a1fbef278a4f736b.png[/img]
1. **Understanding the Problem:**
   We have four adjacent \(2 \times 2\) squares labeled \(1, 2, 3,\) and \(4\). A line passing through the lower left vertex of square \(1\) divides the combined areas of squares \(1, 3,\) and \(4\) in half, resulting in a shaded region with an area of \(6\). We need to find the difference between the areas of the shaded regions within square \(4\) and square \(1\), expressed as \(\frac{p}{q}\), where \(p\) and \(q\) are relatively prime positive integers. Finally, we need to find \(p + q\).

2. **Total Area Calculation:**
   The total area of squares \(1, 3,\) and \(4\) is:
   \[
   3 \times (2 \times 2) = 3 \times 4 = 12
   \]
   Since the line divides this area in half, the shaded region has an area of:
   \[
   \frac{12}{2} = 6
   \]

3. **Using Similar Triangles:**
   The line divides the squares into similar triangles. Let’s denote the areas of the shaded regions in squares \(1, 3,\) and \(4\) as \(A_1, A_3,\) and \(A_4\) respectively. We know that:
   \[
   A_1 + A_3 + A_4 = 6
   \]

4. **Ratio of Areas:**
   By examining the geometry and using the properties of similar triangles, we can determine the ratio of the areas of the shaded regions in squares \(1, 3,\) and \(4\). The problem states that the ratio is \(1:5:7\). Therefore, we can write:
   \[
   A_1 = x, \quad A_3 = 5x, \quad A_4 = 7x
   \]
   Since the total shaded area is \(6\), we have:
   \[
   x + 5x + 7x = 6 \implies 13x = 6 \implies x = \frac{6}{13}
   \]

5. **Calculating Individual Areas:**
   Using \(x = \frac{6}{13}\), we find:
   \[
   A_1 = \frac{6}{13}, \quad A_3 = 5 \times \frac{6}{13} = \frac{30}{13}, \quad A_4 = 7 \times \frac{6}{13} = \frac{42}{13}
   \]

6. **Difference Between Areas:**
   The difference between the areas of the shaded regions within square \(4\) and square \(1\) is:
   \[
   A_4 - A_1 = \frac{42}{13} - \frac{6}{13} = \frac{42 - 6}{13} = \frac{36}{13}
   \]

7. **Finding \(p + q\):**
   Here, \(p = 36\) and \(q = 13\). Since \(36\) and \(13\) are relatively prime, we have:
   \[
   p + q = 36 + 13 = 49
   \]

The final answer is \(\boxed{49}\).