Answers: For the yellow one it’s 14 For the red one it’s 15
Long answer: so the way to do this is to find the ratio. So you look at the filled shape for the yellow ones case it’s the smaller one and the sides have a ratio of 9:6 or 3:2, now since on the other similar shape the 9 lines up with 21 we can divide that by 3 getting us 7 and multiply that by 2 and get 14.
For the red one it’s the same process, 8:6=4:3 so we and we divide 20 by 4 and get 5, then multiply that be 3 and get 15.