the base of a triangle is 2 cm shorter than the width of a rectangle. The rectangle's length is 4 times its width and the triangle's height is the same as the rectangle's length. find the area of both figures if the difference of the two areas is 30cm2

from the data

rectangle:
width = x
length = 4x

triangle:
base = x-2
height = 4x

area of rectangle = x(4x) = 4x^2
area of triangle = (1/2)(x-2)(4x) = 2x^2 - 4x

given:
4x^2 - (2x^2 - 4x) = 30
2x^2 + 4x - 30 = 0
x^2 + 2x - 15=0
(x+5)(x-3) = 0
x = -5 (not possible) or x = 3

area of rect. = 4x^2 = 36
area of triangle = 2x^2 - 4x = 18-16 = 2

I messed up in the last line

should have said:
area of triangle = 2x^2 - 4x = 18-12 = 6

To find the area of both figures, we need to calculate the dimensions of the triangle and the rectangle.

Let's assume:
Width of the rectangle = x cm
Length of the rectangle = 4x cm
Base of the triangle = (x - 2) cm
Height of the triangle = 4x cm (same as the rectangle's length)

To find the area of the rectangle, we multiply its length by its width:
Area of the rectangle = Length × Width = (4x cm) × (x cm) = 4x² cm²

To find the area of the triangle, we use the formula: Area = (1/2) × base × height
Area of the triangle = (1/2) × (x - 2) cm × (4x) cm = 2x(x - 2) cm²

According to the problem, the difference between the areas of the two figures is 30 cm²:
Area of the rectangle - Area of the triangle = 30 cm²

Substituting the previously calculated values into the equation, we have:
4x² cm² - 2x(x - 2) cm² = 30 cm²
4x² cm² - 2x² + 4x cm² = 30 cm²
2x² + 4x cm² = 30 cm²
2x² + 4x - 30 = 0

Now, we can solve the quadratic equation to find the value of x:
2x² + 4x - 30 = 0

To solve this equation, we can factorize it:
(x + 5)(2x - 6) = 0

Setting each factor to zero, we get two solutions:
x + 5 = 0 or 2x - 6 = 0

Solving for x in each equation:
x = -5 or x = 3

Since the width of the rectangle cannot be negative, we discard x = -5.
Therefore, x = 3 cm.

Now that we have the value of x, we can calculate the dimensions and areas of both figures:

Width of the rectangle = x = 3 cm
Length of the rectangle = 4x = 4(3) = 12 cm
Base of the triangle = x - 2 = 3 - 2 = 1 cm
Height of the triangle = 4x = 4(3) = 12 cm

Area of the rectangle = Length × Width = 12 cm × 3 cm = 36 cm²
Area of the triangle = (1/2) × base × height = (1/2) × 1 cm × 12 cm = 6 cm²

Therefore, the area of the rectangle is 36 cm² and the area of the triangle is 6 cm², and the difference between the two areas is indeed 30 cm².