Preheat oven to 350 degrees; grease and flour two 8-inch round baking pans.
In a large bowl, cream butter and sugar until light and fluffy. You do this with a handheld mixer or use the paddle attachment of a stand mixer. Add the eggs and yolk, one at a time, beating well after each addition.
In a separate bowl, thoroughly mix together flour, baking powder, salt and baking soda.
Add the dry ingredients and sour cream alternately, beating well by hand (or using the paddle attachment if using a stand mixer) after each addition.
Stir in lemon juice, zest and rosemary.
Divide the batter evenly between the two pans and bake 25–30 minutes, or until edges begin to brown.
Let the cakes cool for 10 minutes in pans, then invert onto a rack and let cool completely.
Frosting: Beat together cream cheese and butter until creamy. Gradually stir in the powdered sugar and beat until mixed, then add lemon juice and zest and continue beating until light and creamy.