when you check for differentiability, RHD is 3 for sure. it can not be 2 as f'(x) = 3x for x>1 and 1 for x<= 1
so f'(1) = 3 in case of RHD and 1 in case of LHD. as there is one more method by which you were asking to solve but this one is easy and both give same answer, so you are right @rahul.