w varies partly as s and partly as the square of s when s=5,w=18 and when s=5, w=169

We can set up two equations based on the information given:

w = k1s + k2s^2 (equation 1)
where k1 and k2 are constants of proportionality

Using the first set of values, we can substitute s=5 and w=18:

18 = k1(5) + k2(5)^2
18 = 5k1 + 25k2
3 = k1 + 5k2 (equation 2)

Using the second set of values, we can substitute s=5 and w=169:

169 = k1(5) + k2(5)^2
169 = 5k1 + 25k2
13 = k1 + 5k2 (equation 3)

Now we have two equations with two variables (k1 and k2), which we can solve simultaneously. Subtracting equation 3 from equation 2, we get:

3 - 13 = (k1 + 5k2) - (k1 + 5k2)
-10 = -10k2
k2 = 1

Substituting k2=1 into equation 2, we get:

3 = k1 + 5
k1 = -2

Therefore, the equation for w in terms of s is:

w = -2s + s^2

We can check that this equation satisfies both sets of values:

- when s=5, w = -2(5) + 5^2 = 18
- when s=5, w = -2(5) + 5^2 = 169

Therefore, the solution is w = -2s + s^2.

To find the relationship between w and s, we can use the given information.

Step 1: Determine the first part of the relationship.
When s=5, w=18.
Let's denote the first part of the relationship as k1 * s.
We can substitute the values in the equation: 18 = k1 * 5.
Solving for k1: k1 = 18/5 = 3.6.

Therefore, the first part of the relationship is w = 3.6 * s.

Step 2: Determine the second part of the relationship.
When s=5, w=169.
Let's denote the second part of the relationship as k2 * s^2.
We can substitute the values in the equation: 169 = k2 * 5^2.
Simplifying: 169 = k2 * 25.
Solving for k2: k2 = 169/25 = 6.76.

Therefore, the second part of the relationship is w = 6.76 * s^2.

Final Relationship:
Combining the two parts, we get:
w = 3.6 * s + 6.76 * s^2.