Hello @Uddeshya23, i think you get confused with the problem statement. See the statement is
that first sequence is strictly decreasing and second is strictly increasing so by this what do we mean is that we need to find the largest subsequence such that initially, the elements are decreasing and then increasing. So, in this case, we can also consider the whole increasing or whole decreasing cases.
For eg. given sequence is 1 2 3 4 5
Then we can say that it’s decreasing part is 1 and then after increasing part is 2 3 4 5
Or if we get a sequence 5 4 3 2 1
Then we can say that it’s decreasing part is 5 4 3 2 and increasing part is 1.
Pls, try to understand if we need to maintain the dp states we need to consider each and every element. Here you can also say that you searched for strictly decreasing part you didn’t get any and after that you searched for the increasing part and as we want to maximize the sum of them so we are taking it.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks 
Happy Coding !!