Let X denote milk at 45 rs
Y denote milk at 51 rs
Given,
total cost+ profit=1200
Profit= 150
therefore, total cost=1200-150=1050
hence 45X+51Y = 1050
and total milk sold is 22 ltrs
That is, X+Y=22
solving these two equations we get
X= milk at 45 rs = 12 ltr
Y= milk at 51 rs = 10 ltr