Solution
10 at 2s. 6d. and 10 at 2s. 3d.

Xpress-Mosel Model

model 'mixtea'

! Description  : Dudeney's tea mixing problem
! Source       : Dudeney, H.E., (1917), Amusements in Mathematics, Thomas Nelson and Sons.  
! Date written : Xpress-MP 18/10/99, Mosel 17/4/03
! Written by   : M J Chlond 

  uses 'mmxprs'
  
  parameters
    tea = 3
  end-parameters

  declarations
    T = 1..tea
    price: array(T) of real
    x: array(T) of mpvar
  end-declarations    

  price:= [30,27,21]

  minexp:= x(1)

  pcon:= sum(i in T) price(i)*x(i) = 570

  wcon:= sum(i in T) x(i) = 20

  forall(i in T)
    x(i) is_integer

  minimise(minexp)

  forall(i in T)
    write(getsol(x(i)),' ')
    
end-model