If A is the number of toys that Al has, then the number that Ernie has is A/2+3. When we add the number of toys altogether we get the equation A+A/2+3=45. From this we can find A: 3A/2+3=45, 3A/2=45-3=42, 3A=84 (double both sides of the equation), so A=84/3=28. Al has 28 toys so Ernie has 28/2+3=14+3=17 toys.