Neither sentence makes sense. In the first, you don't need the word respectively. The second is just meaningless.
Since you used the same thing (~~~~~~~~~~~~~) to refer to two different variables, I will use A and B instead.
I believe you're trying to shorten it to something like:
The values of the functions f and g are both 1 if A and B are equal to 100 and 300 respectively.
In the first sentence, you already make it clear that A equals 100 and B equals 300, so you don't need respectively.
In the second sentence, you're saying that A is both equal to 100 and 300. This makes no sense, and the word respectively has no use there, it shouldn't be there at all.