Preheat the oven to 350 degrees F. Grease a 13-by-9-inch baking pan with butter and dust with flour.
Prepare the cake mix according to package directions, then add 2 tablespoons lemon juice. Pour the batter into the prepared baking pan and set aside.
Beat the ricotta, lemon zest and 4 ounces of the mascarpone with an electric mixer on medium-low speed until smooth. Add the sugar and vanilla; beat until smooth. Add the eggs, one at a time, beating after each addition until just combined. Gently spread the ricotta mixture evenly over the cake batter.
Bake until the cake layer has risen to the top (the ricotta and cake layers switch places) and a wooden pick inserted in the center of the cake comes out clean, 50 to 60 minutes. Let cool completely, about 30 minutes.
Meanwhile, beat the remaining 12 ounces mascarpone with an electric mixer on medium speed until smooth. Gradually add the milk, beating until smooth. Add the pudding mix and beat until smooth. Let stand until thickened, about 5 minutes. Spread the frosting over the cooled cake.