How to find the area of green region in terms of yellow, blue and red region in the following figure?

How to find the area of green region in terms of yellow, blue and red region in the following figure? The triangle is any random triangle and an arbitrary point $P$ is taken where all the colored regions coincide.

The answer given is $$G = \frac{BY(Y + B + 2R)}{R^2 - BY}$$

• All I know is that had the triangle been equilateral, then the sum of perpendiculars from $P$ to the different sides would have been same as the altitude of the triangle. – TheApe Jul 15 '12 at 4:08
Let the vertices of the triangle adjacent to the green, yellow, and blue areas be $A$, $B$, and $C$ respectively. Suppose the barycentric coordinates of the point $P$ are $\alpha$, $\beta$, and $\gamma$, so that \begin{align} \alpha A + \beta B + \gamma C &= P, \\ \alpha + \beta + \gamma &= 1. \end{align} Let the area of the whole triangle be $\triangle$. Then the area of the red region is $\alpha\triangle$, because the height of $P$ from $BC$ is $\alpha$ times that of $A$. The yellow and red together form a triangle whose third vertex divides $BC$ in the ratio $\alpha:\beta$, so its area is $\triangle\alpha/(\alpha+\beta)$. Similarly, the area of the blue and red together is $\triangle\alpha/(\alpha+\gamma)$. (All this should become clear from looking at the diagrams in the MathWorld article on barycentric coordinates.) Solving, you get \begin{align} \beta &= \frac B{B+R}, \\ \gamma &= \frac Y{Y+R}, \\ \alpha &= 1 - \beta - \gamma = \frac{R^2-BY}{(B+R)(Y+R)}, \\ \triangle &= \frac R\alpha = \frac{R(B+R)(Y+R)}{R^2-BY}. \end{align} The remaining green area is of course $\triangle - R - B - Y$, which simplifies to the desired result.