Hannah bought pears and bananas only, so let's write the following equation:
[tex]\text{total}=\text{pears}+\text{bananas}[/tex]If the total weight bought is 5.12 and 2.5 pounds are pears, we can calculate the weight of bananas bought:
[tex]\begin{gathered} 5.12=2.5+\text{bananas} \\ \text{bananas}=5.12-2.5 \\ \text{bananas}=2.62 \end{gathered}[/tex]So Hannah bought 2.62 pounds of banana.