Step 1: Identify given points and medians
We have point \( A = (1,2) \). The median through \( B \) lies on the line \( x + y = 5 \), and the median through \( C \) lies on the line \( x = 4 \).
Step 2: Understand medians and centroid
The medians of a triangle intersect at the centroid \( G \), which divides each median in the ratio 2:1.
If the vertices are \( A, B, C \), and \( M \), \( N \) are midpoints of opposite sides, then the median from \( B \) passes through the midpoint of \( AC \), and the median from \( C \) passes through the midpoint of \( AB \).
Step 3: Calculate midpoints
Let \( B = (x_B, y_B) \) and \( C = (x_C, y_C) \).
- Midpoint of \( AC \) is \( M = \left(\frac{1 + x_C}{2}, \frac{2 + y_C}{2}\right) \).
- Midpoint of \( AB \) is \( N = \left(\frac{1 + x_B}{2}, \frac{2 + y_B}{2}\right) \).
Step 4: Coordinates of centroid \( G \)
\[
G = \left(\frac{1 + x_B + x_C}{3}, \frac{2 + y_B + y_C}{3}\right)
\]
Step 5: Median through \( B \) lies on \( x + y = 5 \)
The median through \( B \) connects \( B \) and \( M \). The centroid lies on this median, so \( G \) lies on the line \( x + y = 5 \):
\[
\frac{1 + x_B + x_C}{3} + \frac{2 + y_B + y_C}{3} = 5 \implies (1 + x_B + x_C) + (2 + y_B + y_C) = 15
\]
\[
x_B + x_C + y_B + y_C = 12 \quad \quad (1)
\]
Step 6: Median through \( C \) lies on \( x = 4 \)
The median through \( C \) connects \( C \) and \( N \). The centroid \( G \) lies on this median, so \( G \) lies on \( x = 4 \):
\[
\frac{1 + x_B + x_C}{3} = 4 \implies 1 + x_B + x_C = 12 \implies x_B + x_C = 11 \quad \quad (2)
\]
Step 7: Use (1) and (2) to find \( y_B + y_C \)
From (1): \( x_B + x_C + y_B + y_C = 12 \), and (2): \( x_B + x_C = 11 \)
So,
\[
11 + y_B + y_C = 12 \implies y_B + y_C = 1 \quad \quad (3)
\]
Step 8: Use median through \( C \) on \( x=4 \) to find midpoint \( N \)
Midpoint \( N = \left(\frac{1 + x_B}{2}, \frac{2 + y_B}{2}\right) \) lies on median through \( C \) which is \( x=4 \), so \( N_x = 4 \):
\[
\frac{1 + x_B}{2} = 4 \implies 1 + x_B = 8 \implies x_B = 7
\]
Step 9: Use (2) to find \( x_C \)
From (2), \( x_B + x_C = 11 \), so
\[
7 + x_C = 11 \implies x_C = 4
\]
Step 10: Find \( y_B \) and \( y_C \)
We have \( y_B + y_C = 1 \) from (3). Use the median through \( B \) lying on \( x + y = 5 \) to get more info.
The midpoint \( M \) of \( AC \) is:
\[
M = \left(\frac{1 + x_C}{2}, \frac{2 + y_C}{2}\right) = \left(\frac{1 + 4}{2}, \frac{2 + y_C}{2}\right) = (2.5, \frac{2 + y_C}{2})
\]
The median through \( B \) connects \( B(7,y_B) \) and \( M(2.5, \frac{2 + y_C}{2}) \). The slope of the median is:
\[
m = \frac{\frac{2 + y_C}{2} - y_B}{2.5 - 7} = \frac{\frac{2 + y_C}{2} - y_B}{-4.5}
\]
This median lies on the line \( x + y = 5 \), or \( y = 5 - x \), which has slope -1.
So,
\[
\frac{\frac{2 + y_C}{2} - y_B}{-4.5} = -1 \implies \frac{2 + y_C}{2} - y_B = 4.5
\]
Multiply both sides by 2:
\[
2 + y_C - 2 y_B = 9 \implies y_C - 2 y_B = 7 \quad \quad (4)
\]
Step 11: Solve system of equations for \( y_B \) and \( y_C \)
From (3): \( y_B + y_C = 1 \), so \( y_C = 1 - y_B \). Substitute into (4):
\[
(1 - y_B) - 2 y_B = 7 \implies 1 - y_B - 2 y_B = 7 \implies 1 - 3 y_B = 7
\]
\[
-3 y_B = 6 \implies y_B = -2
\]
Then
\[
y_C = 1 - (-2) = 3
\]
Step 12: Final vertices of the triangle
\[
A = (1,2), \quad B = (7, -2), \quad C = (4, 3)
\]
Step 13: Calculate area of \(\triangle ABC\)
Area formula using coordinates:
\[
\text{Area} = \frac{1}{2} \left| x_A(y_B - y_C) + x_B(y_C - y_A) + x_C(y_A - y_B) \right|
\]
Substitute:
\[
= \frac{1}{2} | 1(-2 - 3) + 7(3 - 2) + 4(2 - (-2)) | = \frac{1}{2} | 1(-5) + 7(1) + 4(4) |
\]
\[
= \frac{1}{2} | -5 + 7 + 16 | = \frac{1}{2} | 18 | = 9
\]
Final answer: The area of the triangle \( ABC \) is 9.