Max has a jar of sweets.

All of the sweets are either hard or soft.
There are twice as many hard sweets as soft
sweets.
1/5 of the hard sweets are red.
3/10 of the soft sweets are red.
There are 91 red sweets in total.
Work out the number of sweets in the jar.

h = 2s

1/5 h + 3/10 s = 91
2/5 s + 3/10 s = 91
7/10 s = 91
s = 91 * 10/7 = 130
h = 2s = 260
h+s = 390 sweets in all

number of hards ---- h

number of softs ---- s
but h = 2s

reds = (1/5)h + (3/10)s = 91
times 10
2h + 3s = 910
sub in h = 2s
2(2s) + 3s = 910
7s = 910
s = 130 , then h = 260 , for a total of 390

To solve this problem, we need to break it down into steps:

Step 1: Define the variables
Let's assign variables to the unknown quantities:
- Let's call the total number of sweets in the jar "x."
- Let's call the number of hard sweets "h."
- Let's call the number of soft sweets "s."

Step 2: Set up the equations
From the given information, we can set up two equations:
1) The total number of sweets is the sum of the hard and soft sweets:
x = h + s

2) We have information about the red sweets:
- 1/5 of the hard sweets are red, so the number of red hard sweets is (1/5)h.
- 3/10 of the soft sweets are red, so the number of red soft sweets is (3/10)s.
- The total number of red sweets is 91:
(1/5)h + (3/10)s = 91

Step 3: Solve the equations
Now we can solve these two equations simultaneously to find the values of h, s, and x.

From equation 1, we can isolate s:
s = x - h

Substituting this in equation 2, we get:
(1/5)h + (3/10)(x - h) = 91

Next, we can simplify this equation:
(1/5)h + (3/10)x - (3/10)h = 91
- (2/10)h + (3/10)x = 91
(3/10)x - (2/10)h = 91

We can further simplify this equation by multiplying through by 10 to get rid of the fractions:
3x - 2h = 910

Step 4: Use the equations to solve for h and x
Now, we have two equations:
x = h + s
3x - 2h = 910

We can substitute the value of s (x - h) from the first equation into the second equation:
3x - 2h = 910
3x - 2(h) = 910
3x - 2x + 2h = 910
x + 2h = 910

Now we have two equations with two variables:
x = h + s
x + 2h = 910

We can substitute the value of s (x - h) from the first equation into the second equation to get a linear equation in terms of h:
x + 2h = 910
(x - h) + 2h = 910
x + h = 910

Now, we can solve the system of equations using either substitution or elimination:

Substituting x + h = 910 into x = h + s, we get:
(h + s) + h = 910
2h + s = 910

From this equation, we can see that s = 910 - 2h.

Substituting this value of s back into the equation x = h + s, we can solve for x:
x = h + s
x = h + (910 - 2h)
x = 910 - h

Now, we have two equations with only one variable (h and x). Let's solve for h:

Substituting x = 910 - h into 3x - 2h = 910, we get:
3(910 - h) - 2h = 910
2730 - 3h - 2h = 910
2730 - 5h = 910
-5h = -1820
h = 364

Now we can find x using x = 910 - h:
x = 910 - 364
x = 546

Therefore, the total number of sweets in the jar is 546.