The ratio of the number of postcards john had to the number of postcards Zachary ha d was 4:9. Zachary had 45 more postcards than John. After giving some postcards to John, Zachary had 6/7 as many postcards as John.

(A) How many postcards did Zachary have in the beginning?

(B) How many postcards did Zachary give to John?

can u please explain how you got the answer...thank you

To find the answer to this problem, we can use algebraic equations to represent the given information.

Let's assume John had x postcards initially, and Zachary had y postcards initially.

Given: The ratio of the number of postcards John had to the number of postcards Zachary had was 4:9.
This can be written as x:y = 4:9 or x/y = 4/9 ----(equation 1)

Given: Zachary had 45 more postcards than John.
This can be written as y = x + 45 ----(equation 2)

Given: After giving some postcards to John, Zachary had 6/7 as many postcards as John.
After giving some postcards, Zachary has (y-x) postcards, and John has x+(y-x) = x+y-x = y postcards.
So, the ratio is (y-x) : (x+y) = (6/7).
This can be written as (y-x)/(x+y) = 6/7 ----(equation 3)

Now, let's solve these equations to find the values of x and y.

From equation 1, we have x/y = 4/9.
Cross multiplying, we get 9x = 4y.

Substituting the value of y from equation 2 into this equation, we get:
9x = 4(x+45)
9x = 4x + 180
5x = 180
x = 36

Substituting this value of x into equation 2, we get:
y = x + 45
y = 36 + 45
y = 81

So, Zachary had 81 postcards in the beginning (answer to part A).

Since we have the initial values of x and y, we can calculate the number of postcards Zachary gave to John by subtracting x from y:
Zachary gave y - x = 81 - 36 = 45 postcards to John (answer to part B).