This will give us two simultaneous equations in two unknown variables Length and Width:
farmer has 189 ft of fence AND river on one side, so the farmer will not need any fence on that side. The two breeds are separated by a fence.
(1) L + 3W = 189
wants the meadow to have an area of 2958 ft2
(2) LW = 2958
As the question says "What should the dimensions of the meadow be?" and doesn't specify how to solve, I will show three methods.
First and quickest, let's do a "guesstimate", by approximating to 3,000 ft2, which means not so many choices for L x W:
1000 x 3
500 x 6
300 x 10
200 x 15
150 x 20
100 x 30
and we can quickly see that 100 x 30 is our best choice as 100 + 3(30) = 190
So, approximately, our field is a rectangle 100 feet x 30 feet with one long side bordered by the river, and divided into two parts by another fence of width of 30 feet.
For a more exact answer, we must rearrange (1) to make L subject, and then substitute this in (2) which gives us: L = 189 - 3W and then (189 - 3W)W = 2958
And this will give us a quadratic in W as follows:
=> -3W2 + 189W = 2958
=> 3W2 - 189W + 2958 = 0
=> 3(W2 - 63W + 986) = 0
At this point, we could use Desmos Graphing or similar to plot the equation y = 3W2 - 189W + 2958 where the x axis is W. We then read off the values where y = 0. As it's a quadratic (a parabola) we get 2 values: 29 and 34. (We are told to use the smaller of two W answers, hence 29.) And we can now find L from equation (1).
Or, we can solve the quadratic for W. Either with the quadratic formula with a = 1, b = -63 and c = 986, or, in this case, by factorizing.
3(W2 - 63W + 986) = 0
=> 3(W - 29)(W - 34) = 0
=> W = 29 or W = 34 (choose the smaller as instructed)
Which we can now substitute in (1) to get
L + 3(29) = 189
=> L = 189 - 87 = 102
Hence our required rectangular field is L = 102 feet by W = 29 feet, divided into two parts by another fence of width of 29 feet.
We can double-check: L x W = 102 x 29 = 2958, as required... and L + 3W = 102 + 3(29) = 189, as required. And, it's very close to our original guesstimate.