Let's assume Eric's height before summer is x cm. After summer, he became 5% taller, which means his new height is 1.05x cm. We also know that his new height is 151.2 cm. So we can set up an equation:
1.05x = 151.2
To solve for x, we can divide both sides by 1.05:
x = 151.2 / 1.05
x = 144 cm
Therefore, Eric's height before summer was 144 cm.