Tony bought some stock for $504. If each share had cost $4 less he could have bought 3 more shares for the same $504. How many shares of stock did he buy

L*Price=504

(L+3)*(Price-4)=504

LP-4L+3P-12-504=0
next L=504/P
504-4*504/P+3P-516=0
now combine terms, and multiply by P

-12P-2016 +3P^2=0

divide by 3, rearrange terms...
P^2-4P-672=0

(P-26)(P-22)=0
So the at the higher price (26), he bought L=504/26

To solve this problem, we can set up a system of equations. Let's say Tony bought "x" shares of stock.

According to the problem, Tony bought the stock for $504. So we have the equation: x * (price per share) = $504

We are also given the information that if each share had cost $4 less, he could have bought 3 more shares for the same $504. So we have another equation: (x + 3) * (price per share - $4) = $504

Now, we can proceed to solve the system of equations.

Step 1: Simplify the equations
x * (price per share) = $504
(x + 3) * (price per share - $4) = $504

Step 2: Rewrite the second equation
(x + 3) * (price per share) - 4(x + 3) = $504

Step 3: Expand and simplify the second equation
(x + 3)*(price per share) - 4x - 12 = $504
(x * price per share) + (3 * price per share) - 4x - 12 = $504

Step 4: Simplify further
x * price per share + 3 * price per share - 4x - 12 = $504

Step 5: Group like terms
(price per share) * (x + 3) - 4x - 12 = $504

Step 6: Simplify and rearrange the equation
(price per share) * x + 3 * (price per share) - 4x = $504 + 12
(price per share - 4) * x + 3 * price per share = $516

Step 7: Divide both sides by (price per share - 4)
x + 3 * (price per share) / (price per share - 4) = $516 / (price per share - 4)

We don't have the specific price per share, but we can determine the value of x by analyzing the equation.

If we assume that (price per share - 4) is not equal to zero, we can divide both sides of the equation by (price per share - 4). This will give us the value of x, which represents the number of shares Tony bought.

However, if (price per share - 4) is equal to zero, it implies that the price per share is $4. In this case, the equation is undefined since we cannot divide by zero.

We need further information to solve this problem.