Suppose that r varies directly with s and inversely with t, and r = 2 when s = 3 and t = 12. What is the value of r when s = 5 and t = 4?

First, let's set up the direct and inverse variation equation:

r = ks/t

where k is the constant of variation.

Using the given values when r = 2, s = 3, and t = 12:

2 = k*3/12
2 = k*1/4
2 = k/4
k = 8

Now we can find the value of r when s = 5 and t = 4:

r = 8*5/4
r = 10

Therefore, when s = 5 and t = 4, the value of r is 10.