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 solve this problem, let's break it down step by step:

Step 1: Set up equations
Let's assume that John had x postcards and Zachary had y postcards.

We are given two pieces of information:
1. 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.
2. Zachary had 45 more postcards than John. This can be written as y = x + 45.

Step 2: Solve the equations
To find the values of x and y, we need to solve the equations simultaneously.

From equation 2, we can substitute the value of y in equation 1:
x/y = 4/9
x/(x + 45) = 4/9

To solve this equation, we can cross-multiply:
9x = 4(x + 45)
9x = 4x + 180
5x = 180
x = 36

Now, substitute the value of x in equation 2 to find y:
y = x + 45
y = 36 + 45
y = 81

So, John had 36 postcards and Zachary had 81 postcards in the beginning.

Step 3: Determine how many postcards Zachary gave to John
After giving some postcards to John, Zachary had 6/7 as many postcards as John.

Let's assume Zachary gave z postcards to John. After giving z postcards to John, Zachary had (81 - z) postcards, and John had (36 + z) postcards.

According to the given information, (81 - z) = (6/7) * (36 + z).

To solve this equation, we can cross-multiply:
7(81 - z) = 6(36 + z)
567 - 7z = 216 + 6z

Simplifying the equation:
-7z - 6z = 216 - 567
-13z = -351
z = 27

So, Zachary gave 27 postcards to John.

Therefore, the answers to the questions are:
(A) Zachary had 81 postcards in the beginning.
(B) Zachary gave 27 postcards to John.